tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
Merge #195393: lispPackages_new.sbclPackages: fix Qt4
Vladimír Čunát
3 years ago
cb6f2178
0e837209
+198
7 changed files
expand all
collapse all
unified
split
maintainers
maintainer-list.nix
pkgs
development
libraries
smokegen
default.nix
smokeqt
default.nix
lisp-modules-new
packages.nix
patches
qt-libs-dont-download.patch
qtools-use-nix-libs.patch
top-level
all-packages.nix
+6
maintainers/maintainer-list.nix
···
14216
14216
githubId = 928084;
14217
14217
name = "Utku Demir";
14218
14218
};
14219
14219
+
uthar = {
14220
14220
+
email = "galkowskikasper@gmail.com";
14221
14221
+
github = "uthar";
14222
14222
+
githubId = 15697697;
14223
14223
+
name = "Kasper Gałkowski";
14224
14224
+
};
14219
14225
uvnikita = {
14220
14226
email = "uv.nikita@gmail.com";
14221
14227
github = "uvNikita";
+21
pkgs/development/libraries/smokegen/default.nix
···
1
1
+
{ pkgs, lib, ... }:
2
2
+
3
3
+
pkgs.stdenv.mkDerivation rec {
4
4
+
pname = "smokegen";
5
5
+
version = "v4.14.3";
6
6
+
src = pkgs.fetchzip {
7
7
+
url = "https://invent.kde.org/unmaintained/${pname}/-/archive/${version}/${pname}-${version}.tar.gz";
8
8
+
hash = "sha256-finsoruPeJZLawIjNUJ25Pq54eaCByfALVraNQJPk7c=";
9
9
+
};
10
10
+
buildInputs = [ pkgs.cmake pkgs.qt4 ];
11
11
+
buildPhase = ''
12
12
+
cmake .
13
13
+
'';
14
14
+
meta = with lib; {
15
15
+
description = "A general purpose C++ parser with a plugin infrastructure";
16
16
+
homepage = "https://invent.kde.org/unmaintained/smokegen";
17
17
+
license = licenses.gpl2Only;
18
18
+
platforms = platforms.unix;
19
19
+
maintainers = with maintainers; [ uthar ];
20
20
+
};
21
21
+
}
+21
pkgs/development/libraries/smokeqt/default.nix
···
1
1
+
{ pkgs, lib, ... }:
2
2
+
3
3
+
pkgs.stdenv.mkDerivation rec {
4
4
+
pname = "smokeqt";
5
5
+
version = "v4.14.3";
6
6
+
src = pkgs.fetchzip {
7
7
+
url = "https://invent.kde.org/unmaintained/${pname}/-/archive/${version}/${pname}-${version}.tar.gz";
8
8
+
hash = "sha256-8FiEGF8gduVw5I/bi2wExGUWmjIjYEhWpjpXKJGBNMg=";
9
9
+
};
10
10
+
cmakeFlags = [
11
11
+
"-DCMAKE_CXX_STANDARD=98"
12
12
+
];
13
13
+
buildInputs = [ pkgs.cmake pkgs.qt4 pkgs.smokegen ];
14
14
+
meta = with lib; {
15
15
+
description = "Bindings for the Qt libraries";
16
16
+
homepage = "https://invent.kde.org/unmaintained/smokeqt";
17
17
+
license = licenses.gpl2Only;
18
18
+
platforms = platforms.unix;
19
19
+
maintainers = with maintainers; [ uthar ];
20
20
+
};
21
21
+
}
+91
pkgs/development/lisp-modules-new/packages.nix
···
11
11
optionals
12
12
hasSuffix
13
13
splitString
14
14
+
remove
15
15
+
optionalString
16
16
+
stringLength
14
17
;
15
18
16
19
# Used by builds that would otherwise attempt to write into storeDir.
···
42
45
# Patches are already applied in `build`
43
46
patches = [];
44
47
src = build;
48
48
+
# TODO(kasper): handle this with a setup hook
49
49
+
LD_LIBRARY_PATH =
50
50
+
build.LD_LIBRARY_PATH
51
51
+
+ (optionalString (stringLength build.LD_LIBRARY_PATH != 0) ":")
52
52
+
+ "${build}";
45
53
});
46
54
47
55
# A little hacky
···
331
339
};
332
340
version = "f19162e76";
333
341
});
342
342
+
343
343
+
qt = let
344
344
+
rev = "dffff3ee3dbd0686c85c323f579b8bbf4881e60e";
345
345
+
in build-with-compile-into-pwd rec {
346
346
+
pname = "commonqt";
347
347
+
version = builtins.substring 0 7 rev;
348
348
+
349
349
+
src = pkgs.fetchFromGitHub {
350
350
+
inherit rev;
351
351
+
owner = pname;
352
352
+
repo = pname;
353
353
+
hash = "sha256-GAgwT0D9mIkYPTHfCH/KxxIv7b6QGwcxwZE7ehH5xug=";
354
354
+
};
355
355
+
356
356
+
buildInputs = [ pkgs.qt4 ];
357
357
+
nativeBuildInputs = [ pkgs.smokegen pkgs.smokeqt ];
358
358
+
nativeLibs = [ pkgs.qt4 pkgs.smokegen pkgs.smokeqt ];
359
359
+
360
360
+
systems = [ "qt" ];
361
361
+
362
362
+
lispLibs = with ql; [
363
363
+
cffi named-readtables cl-ppcre alexandria
364
364
+
closer-mop iterate trivial-garbage bordeaux-threads
365
365
+
];
366
366
+
};
367
367
+
368
368
+
qt-libs = build-with-compile-into-pwd {
369
369
+
inherit (ql.qt-libs) pname version src;
370
370
+
patches = [ ./patches/qt-libs-dont-download.patch ];
371
371
+
prePatch = ''
372
372
+
substituteInPlace systems/*.asd --replace ":qt+libs" ":qt"
373
373
+
echo "LD Path: $LD_LIBRARY_PATH"
374
374
+
'';
375
375
+
lispLibs = ql.qt-libs.lispLibs ++ [ qt ];
376
376
+
systems = [
377
377
+
"qt-libs"
378
378
+
"commonqt"
379
379
+
# "phonon"
380
380
+
# "qimageblitz"
381
381
+
# "qsci"
382
382
+
"qt3support"
383
383
+
"qtcore"
384
384
+
"qtdbus"
385
385
+
"qtdeclarative"
386
386
+
"qtgui"
387
387
+
"qthelp"
388
388
+
"qtnetwork"
389
389
+
"qtopengl"
390
390
+
"qtscript"
391
391
+
"qtsql"
392
392
+
"qtsvg"
393
393
+
"qttest"
394
394
+
"qtuitools"
395
395
+
# "qtwebkit"
396
396
+
"qtxml"
397
397
+
"qtxmlpatterns"
398
398
+
# "qwt"
399
399
+
"smokebase"
400
400
+
];
401
401
+
};
402
402
+
commonqt = qt-libs;
403
403
+
qt3support = qt-libs;
404
404
+
qtcore = qt-libs;
405
405
+
qtdbus = qt-libs;
406
406
+
qtdeclarative = qt-libs;
407
407
+
qtgui = qt-libs;
408
408
+
qthelp = qt-libs;
409
409
+
qtnetwork = qt-libs;
410
410
+
qtopengl = qt-libs;
411
411
+
qtscript = qt-libs;
412
412
+
qtsql = qt-libs;
413
413
+
qtsvg = qt-libs;
414
414
+
qttest = qt-libs;
415
415
+
qtuitools = qt-libs;
416
416
+
qtxml = qt-libs;
417
417
+
qtxmlpatterns = qt-libs;
418
418
+
smokebase = qt-libs;
419
419
+
420
420
+
qtools = build-with-compile-into-pwd {
421
421
+
inherit (ql.qtools) pname version src nativeLibs;
422
422
+
lispLibs = [ qt ] ++ remove ql.qt_plus_libs ql.qtools.lispLibs ++ [ qt-libs ];
423
423
+
patches = [ ./patches/qtools-use-nix-libs.patch ];
424
424
+
};
334
425
335
426
};
336
427
+36
pkgs/development/lisp-modules-new/patches/qt-libs-dont-download.patch
···
1
1
+
--- a/qt-libs.asd
2
2
+
+++ b/qt-libs.asd
3
3
+
@@ -17,5 +17,4 @@
4
4
+
:components ((:file "qt-libs"))
5
5
+
:depends-on (:qt-lib-generator
6
6
+
:cl-ppcre
7
7
+
- :cffi)
8
8
+
- :perform (asdf:load-op :after (op c) (uiop:symbol-call :qt-libs :ensure-standalone-libs)))
9
9
+
+ :cffi))
10
10
+
--- a/qt-libs.lisp
11
11
+
+++ b/qt-libs.lisp
12
12
+
@@ -94,16 +94,14 @@
13
13
+
standalone-dir)
14
14
+
15
15
+
(defun %ensure-lib-loaded (file)
16
16
+
- (let ((file (etypecase file
17
17
+
- (pathname file)
18
18
+
- (string (installed-library-file file))))
19
19
+
- (name (intern (string-upcase (pathname-name file))))
20
20
+
- #+sbcl(sb-ext:*muffled-warnings* 'style-warning))
21
21
+
- (cffi::register-foreign-library
22
22
+
- name `((T ,file))
23
23
+
- :search-path (to-directory file))
24
24
+
- (unless (cffi:foreign-library-loaded-p name)
25
25
+
- (cffi:load-foreign-library name))))
26
26
+
+ (let ((name (make-pathname :name (format nil "lib~a" file)
27
27
+
+ :type #+unix "so"
28
28
+
+ #+darwin "dylib")))
29
29
+
+ (or (find-if (lambda (lib)
30
30
+
+ (equal (cffi:foreign-library-pathname lib)
31
31
+
+ (namestring name)))
32
32
+
+ (cffi:list-foreign-libraries))
33
33
+
+ (cffi:load-foreign-library name))))
34
34
+
35
35
+
(defun ensure-lib-loaded (file)
36
36
+
(cond ((pathnamep file)
+19
pkgs/development/lisp-modules-new/patches/qtools-use-nix-libs.patch
···
1
1
+
Dont use the qt+libs system for managing Qt dependencies, because Nix provides
2
2
+
them already.
3
3
+
Don't build the deploy.lisp helper file, because Nix also can handle deployment.
4
4
+
--- a/qtools.asd
5
5
+
+++ b/qtools.asd
6
6
+
@@ -33,10 +33,9 @@
7
7
+
(:file "generate")
8
8
+
(:file "dynamic")
9
9
+
(:file "precompile")
10
10
+
- (:file "deploy")
11
11
+
(:file "fast-call")
12
12
+
(:file "documentation"))
13
13
+
- :depends-on (:qt+libs
14
14
+
+ :depends-on (:qt
15
15
+
:deploy
16
16
+
:cl-ppcre
17
17
+
:closer-mop
18
18
+
19
19
+
Diff finished. Sun Oct 2 14:38:06 2022
+4
pkgs/top-level/all-packages.nix
···
4866
4866
4867
4867
simg2img = callPackage ../tools/filesystems/simg2img { };
4868
4868
4869
4869
+
smokegen = callPackage ../development/libraries/smokegen {};
4870
4870
+
4871
4871
+
smokeqt = callPackage ../development/libraries/smokeqt {};
4872
4872
+
4869
4873
snazy = callPackage ../development/tools/snazy { };
4870
4874
4871
4875
snippetpixie = callPackage ../tools/text/snippetpixie { };