redis-plus-plus: 1.3.7 -> 1.3.10
[NixPkgs.git] / pkgs / development / lisp-modules-new-obsolete / packages.nix
blob1c65a369f0e3c2d4b7328a4ecdf71e207faf05e5
1 { build-asdf-system, lisp, quicklispPackagesFor, fixupFor, pkgs, ... }:
3 let
5   inherit (pkgs.lib)
6     head
7     makeLibraryPath
8     makeSearchPath
9     setAttr
10     hasAttr
11     optionals
12     hasSuffix
13     splitString
14   ;
16   # Used by builds that would otherwise attempt to write into storeDir.
17   #
18   # Will run build two times, keeping all files created during the
19   # first run, exept the FASL's. Then using that directory tree as the
20   # source of the second run.
21   #
22   # E.g. cl-unicode creating .txt files during compilation
23   build-with-compile-into-pwd = args:
24     let
25       build = (build-asdf-system (args // { version = args.version + "-build"; }))
26         .overrideAttrs(o: {
27           buildPhase = with builtins; ''
28             mkdir __fasls
29             export LD_LIBRARY_PATH=${makeLibraryPath o.nativeLibs}:$LD_LIBRARY_PATH
30             export CLASSPATH=${makeSearchPath "share/java/*" o.javaLibs}:$CLASSPATH
31             export CL_SOURCE_REGISTRY=$CL_SOURCE_REGISTRY:$(pwd)//
32             export ASDF_OUTPUT_TRANSLATIONS="$(pwd):$(pwd)/__fasls:${storeDir}:${storeDir}"
33             ${o.lisp} ${o.buildScript}
34           '';
35           installPhase = ''
36             mkdir -pv $out
37             rm -rf __fasls
38             cp -r * $out
39           '';
40         });
41     in build-asdf-system (args // {
42       # Patches are already applied in `build`
43       patches = [];
44       src = build;
45     });
47   # A little hacky
48   isJVM = hasSuffix "abcl" (head (splitString " " lisp));
50   # Makes it so packages imported from Quicklisp can be re-used as
51   # lispLibs ofpackages in this file.
52   ql = quicklispPackagesFor { inherit lisp; fixup = fixupFor packages; };
54   packages = rec {
56   asdf = build-with-compile-into-pwd {
57     pname = "asdf";
58     version = "3.3.5.3";
59     src = pkgs.fetchzip {
60       url = "https://gitlab.common-lisp.net/asdf/asdf/-/archive/3.3.5.3/asdf-3.3.5.3.tar.gz";
61       sha256 = "0aw200awhg58smmbdmz80bayzmbm1a6547gv0wmc8yv89gjqldbv";
62     };
63     systems = [ "asdf" "uiop" ];
64   };
66   uiop = asdf.overrideLispAttrs(o: {
67     pname = "uiop";
68   });
70   cffi = let
71     jna = pkgs.fetchMavenArtifact {
72       groupId = "net.java.dev.jna";
73       artifactId = "jna";
74       version = "5.9.0";
75       sha256 = "0qbis8acv04fi902qzak1mbagqaxcsv2zyp7b8y4shs5nj0cgz7a";
76     };
77   in build-asdf-system {
78     src =  pkgs.fetchzip {
79       url = "http://beta.quicklisp.org/archive/cffi/2021-04-11/cffi_0.24.1.tgz";
80       sha256 = "17ryim4xilb1rzxydfr7595dnhqkk02lmrbkqrkvi9091shi4cj3";
81     };
82     version = "0.24.1";
83     pname = "cffi";
84     lispLibs = with ql; [
85       alexandria
86       babel
87       trivial-features
88     ];
89     javaLibs = optionals isJVM [ jna ];
90   };
92   cffi-libffi = ql.cffi-libffi.overrideLispAttrs (o: {
93     src = pkgs.fetchzip {
94       url = "https://github.com/cffi/cffi/archive/3f842b92ef808900bf20dae92c2d74232c2f6d3a.tar.gz";
95       sha256 = "1jilvmbbfrmb23j07lwmkbffc6r35wnvas5s4zjc84i856ccclm2";
96     };
97     patches = [ ./patches/cffi-libffi-darwin-ffi-h.patch ];
98   });
100   cl-unicode = build-with-compile-into-pwd {
101     pname = "cl-unicode";
102     version = "0.1.6";
103     src =  pkgs.fetchzip {
104       url = "https://github.com/edicl/cl-unicode/archive/refs/tags/v0.1.6.tar.gz";
105       sha256 = "0ykx2s9lqfl74p1px0ik3l2izd1fc9jd1b4ra68s5x34rvjy0hza";
106     };
107     systems = [ "cl-unicode" ];
108     lispLibs = with ql; [
109       cl-ppcre
110       flexi-streams
111     ];
112   };
114   jzon = build-asdf-system {
115     src = pkgs.fetchzip {
116       url = "https://github.com/Zulu-Inuoe/jzon/archive/6b201d4208ac3f9721c461105b282c94139bed29.tar.gz";
117       sha256 = "01d4a78pjb1amx5amdb966qwwk9vblysm1li94n3g26mxy5zc2k3";
118     };
119     version = "0.0.0-20210905-6b201d4208";
120     pname = "jzon";
121     lispLibs = [
122       ql.closer-mop
123     ];
124     systems = [ "com.inuoe.jzon" ];
125   };
127   cl-notify = build-asdf-system {
128     pname = "cl-notify";
129     version = "20080904-138ca7038";
130     src = pkgs.fetchzip {
131       url = "https://repo.or.cz/cl-notify.git/snapshot/138ca703861f4a1fbccbed557f92cf4d213668a1.tar.gz";
132       sha256 = "0k6ns6fzvjcbpsqgx85r4g5m25fvrdw9481i9vyabwym9q8bbqwx";
133     };
134     lispLibs = [
135       cffi
136     ];
137     nativeLibs = [
138       pkgs.libnotify
139     ];
140   };
142   cl-liballegro-nuklear = build-with-compile-into-pwd {
143     inherit (ql.cl-liballegro-nuklear) pname version src;
144     nativeBuildInputs = [ pkgs.allegro5 ];
145     nativeLibs = [ pkgs.allegro5 ];
146     lispLibs = ql.cl-liballegro-nuklear.lispLibs ++ [ ql.cl-liballegro ];
147     patches = [ ./patches/cl-liballegro-nuklear-missing-dll.patch ];
148   };
151   tuple = build-asdf-system {
152     pname = "tuple";
153     version = "b74bd067d";
154     src = pkgs.fetchzip {
155       url = "https://fossil.galkowski.xyz/tuple/tarball/b74bd067d4533ac0/tuple.tar.gz";
156       sha256 = "0dk356vkv6kwwcmc3j08x7143549m94rd66rpkzq8zkb31cg2va8";
157     };
158   };
160   cl-tar-file = build-asdf-system {
161     pname = "cl-tar-file";
162     version = "v0.2.1";
163     src = pkgs.fetchzip {
164       url = let
165         rev = "0c10bc82f14702c97a26dc25ce075b5d3a2347d1";
166       in "https://gitlab.common-lisp.net/cl-tar/cl-tar-file/-/archive/${rev}/cl-tar-file-${rev}.tar.gz";
167       sha256 = "0i8j05fkgdqy4c4pqj0c68sh4s3klpx9kc5wp73qwzrl3xqd2svy";
168     };
169     lispLibs = with ql; [
170       alexandria
171       babel
172       trivial-gray-streams
173       _40ants-doc
174       salza2
175       chipz
176       flexi-streams
177       parachute
178     ];
179     systems = [ "tar-file" "tar-file/test" ];
180   };
182   cl-tar = build-asdf-system {
183     pname = "cl-tar";
184     version = "v0.2.1";
185     src = pkgs.fetchzip {
186       url = let
187         rev = "7c6e07a10c93d9e311f087b5f6328cddd481669a";
188       in "https://gitlab.common-lisp.net/cl-tar/cl-tar/-/archive/${rev}/cl-tar-${rev}.tar.gz";
189       sha256 = "0wp23cs3i6a89dibifiz6559la5nk58d1n17xvbxq4nrl8cqsllf";
190     };
191     lispLibs = with ql; [
192       alexandria
193       babel
194       local-time
195       split-sequence
196       _40ants-doc
197       parachute
198       osicat
199     ] ++ [ cl-tar-file ];
200     systems = [
201       "tar"
202       "tar/common-extract"
203       "tar/simple-extract"
204       "tar/extract"
205       "tar/create"
206       "tar/docs"
207       "tar/test"
208       "tar/create-test"
209       "tar/extract-test"
210       "tar/simple-extract-test"
211     ];
212   };
214   lessp = build-asdf-system {
215     pname = "lessp";
216     version = "0.2-f8a9e4664";
217     src = pkgs.fetchzip {
218       url = "https://github.com/facts-db/cl-lessp/archive/632217602b85b679e8d420654a0aa39e798ca3b5.tar.gz";
219       sha256 = "0i3ia14dzqwjpygd0zn785ff5vqnnmkn75psfpyx0ni3jr71lkq9";
220     };
221   };
223   rollback = build-asdf-system {
224     pname = "rollback";
225     version = "0.1-5d3f21fda";
226     src = pkgs.fetchzip {
227       url = "https://github.com/facts-db/cl-rollback/archive/5d3f21fda8f04f35c5e9d20ee3b87db767915d15.tar.gz";
228       sha256 = "12dpxsbm2al633y87i8p784k2dn4bbskz6sl40v9f5ljjmjqjzxf";
229     };
230   };
232   facts = build-asdf-system {
233     pname = "facts";
234     version = "0.1-632217602";
235     src = pkgs.fetchzip {
236       url = "https://github.com/facts-db/cl-lessp/archive/632217602b85b679e8d420654a0aa39e798ca3b5.tar.gz";
237       sha256 = "09z1vwzjm7hlb529jl3hcjnfd11gh128lmdg51im7ar4jv4746iw";
238     };
239     lispLibs = [ lessp rollback ] ++ [ ql.local-time ];
240   };
243   cl-fuse = build-with-compile-into-pwd {
244     inherit (ql.cl-fuse) pname version src lispLibs;
245     nativeBuildInputs = [ pkgs.fuse ];
246     nativeLibs = [ pkgs.fuse ];
247   };
249   cl-containers = build-asdf-system {
250     inherit (ql.cl-containers) pname version src;
251     lispLibs = ql.cl-containers.lispLibs ++ [ ql.moptilities ];
252     systems = [ "cl-containers" "cl-containers/with-moptilities" ];
253   };
255   swank = build-with-compile-into-pwd {
256     inherit (ql.swank) pname version src lispLibs;
257     patches = [ ./patches/swank-pure-paths.patch ];
258     postConfigure = ''
259       substituteAllInPlace swank-loader.lisp
260     '';
261   };
263   clx-truetype = build-asdf-system {
264     pname = "clx-truetype";
265     version = "20160825-git";
266     src = pkgs.fetchzip {
267       url = "http://beta.quicklisp.org/archive/clx-truetype/2016-08-25/clx-truetype-20160825-git.tgz";
268       sha256 = "079hyp92cjkdfn6bhkxsrwnibiqbz4y4af6nl31lzw6nm91j5j37";
269     };
270     lispLibs = with ql; [
271       alexandria bordeaux-threads cl-aa cl-fad cl-paths cl-paths-ttf
272       cl-store cl-vectors clx trivial-features zpb-ttf
273     ];
274   };
276   mathkit = build-asdf-system {
277     inherit (ql.mathkit) pname version src asds lisp;
278     lispLibs = ql.mathkit.lispLibs ++ [ ql.sb-cga ];
279   };
281   nyxt-gtk = build-asdf-system {
282     inherit (ql.nyxt) pname lisp;
283     version = "2.2.4";
285     lispLibs = ql.nyxt.lispLibs ++ (with ql; [
286       cl-cffi-gtk cl-webkit2 mk-string-metrics
287     ]);
289     src = pkgs.fetchzip {
290       url = "https://github.com/atlas-engineer/nyxt/archive/2.2.4.tar.gz";
291       sha256 = "12l7ir3q29v06jx0zng5cvlbmap7p709ka3ik6x29lw334qshm9b";
292     };
294     nativeBuildInputs = [ pkgs.makeWrapper ];
295     buildInputs = [
296       # needed for GSETTINGS_SCHEMAS_PATH
297       pkgs.gsettings-desktop-schemas pkgs.glib pkgs.gtk3
299       # needed for XDG_ICON_DIRS
300       pkgs.gnome.adwaita-icon-theme
301     ];
303     buildScript = pkgs.writeText "build-nyxt.lisp" ''
304       (require :asdf)
305       (asdf:load-system :nyxt/gtk-application)
306       (sb-ext:save-lisp-and-die "nyxt" :executable t
307                                        #+sb-core-compression :compression
308                                        #+sb-core-compression t
309                                        :toplevel #'nyxt:entry-point)
310     '';
312     # Run with WEBKIT_FORCE_SANDBOX=0 if getting a runtime error in webkitgtk-2.34.4
313     installPhase = ql.nyxt.installPhase + ''
314       rm -v $out/nyxt
315       mkdir -p $out/bin
316       cp -v nyxt $out/bin
317       wrapProgram $out/bin/nyxt \
318         --prefix LD_LIBRARY_PATH : $LD_LIBRARY_PATH \
319         --prefix XDG_DATA_DIRS : $XDG_ICON_DIRS \
320         --prefix XDG_DATA_DIRS : $GSETTINGS_SCHEMAS_PATH \
321         --prefix GIO_EXTRA_MODULES ":" ${pkgs.dconf.lib}/lib/gio/modules/ \
322         --prefix GIO_EXTRA_MODULES ":" ${pkgs.glib-networking}/lib/gio/modules/
323     '';
324   };
326   nyxt = nyxt-gtk;
328   ltk = ql.ltk.overrideLispAttrs (o: {
329     src = pkgs.fetchzip {
330       url = "https://github.com/uthar/ltk/archive/f19162e76d6c7c2f51bd289b811d9ba20dd6555e.tar.gz";
331       sha256 = "0mzikv4abq9yqlj6dsji1wh34mjizr5prv6mvzzj29z1485fh1bj";
332     };
333     version = "f19162e76";
334   });
335   };
336 in packages