Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / lisp-modules-obsolete / lisp-packages.nix
blob6688ebcc527c82707f3b020d64e21180e124ad3b
1 {lib, stdenv, clwrapper, pkgs, sbcl, coreutils, nix, asdf}:
2 let lispPackages = rec {
3   inherit lib pkgs clwrapper stdenv;
4   nixLib = pkgs.lib;
5   callPackage = nixLib.callPackageWith lispPackages;
7   buildLispPackage =  callPackage ./define-package.nix;
9   quicklisp = buildLispPackage rec {
10     baseName = "quicklisp";
11     version = "2021-02-13";
13     buildSystems = [];
15     description = "The Common Lisp package manager";
16     deps = [];
17     src = pkgs.fetchFromGitHub {
18       owner = "quicklisp";
19       repo = "quicklisp-client";
20       rev = "version-${version}";
21       sha256 = "sha256-1HLVPhl8aBaeG8dRLxBh0j0X/0wqFeNYK1CEfiELToA=";
22     };
23     overrides = x: rec {
24       inherit clwrapper;
25       quicklispdist = pkgs.fetchurl {
26         # Will usually be replaced with a fresh version anyway, but needs to be
27         # a valid distinfo.txt
28         url = "http://beta.quicklisp.org/dist/quicklisp/2021-12-09/distinfo.txt";
29         sha256 = "sha256:0gc4cv73nl7xkfwvmkmfhfx6yqf876nfm2v24v6fky9n24sh4y6w";
30       };
31       buildPhase = "true; ";
32       postInstall = ''
33         substituteAll ${./quicklisp.sh} "$out"/bin/quicklisp
34         chmod a+x "$out"/bin/quicklisp
35         cp "${quicklispdist}" "$out/lib/common-lisp/quicklisp/quicklisp-distinfo.txt"
36       '';
37     };
38   };
40   quicklisp-to-nix-system-info = stdenv.mkDerivation {
41     pname = "quicklisp-to-nix-system-info";
42     version = "1.0.0";
43     src = ./quicklisp-to-nix;
44     nativeBuildInputs = [sbcl];
45     buildInputs = [
46       lispPackages.quicklisp coreutils
47     ];
48     touch = coreutils;
49     nix-prefetch-url = nix;
50     inherit quicklisp;
51     buildPhase = ''
52       ${sbcl}/bin/sbcl --eval '(load #P"${asdf}/lib/common-lisp/asdf/build/asdf.lisp")' --load $src/system-info.lisp --eval '(ql-to-nix-system-info::dump-image)'
53     '';
54     installPhase = ''
55       mkdir -p $out/bin
56       cp quicklisp-to-nix-system-info $out/bin
57     '';
58     dontStrip = true;
59   };
61   quicklisp-to-nix = stdenv.mkDerivation {
62     pname = "quicklisp-to-nix";
63     version = "1.0.0";
64     src = ./quicklisp-to-nix;
65     buildDependencies = [sbcl quicklisp-to-nix-system-info];
66     buildInputs = with pkgs.lispPackages; [md5 cl-emb alexandria external-program];
67     touch = coreutils;
68     nix-prefetch-url = nix;
69     inherit quicklisp;
70     deps = [];
71     system-info = quicklisp-to-nix-system-info;
72     buildPhase = ''
73       ${clwrapper}/bin/cl-wrapper.sh "${sbcl}/bin/sbcl" --eval '(load #P"${asdf}/lib/common-lisp/asdf/build/asdf.lisp")' --load $src/ql-to-nix.lisp --eval '(ql-to-nix::dump-image)'
74     '';
75     installPhase = ''
76       mkdir -p $out/bin
77       cp quicklisp-to-nix $out/bin
78     '';
79     dontStrip = true;
80   };
82   clx-truetype = buildLispPackage rec {
83           baseName = "clx-truetype";
84           version = "20160825-git";
86           buildSystems = [ "clx-truetype" ];
87           parasites = [ "clx-truetype-test" ];
89           description = "clx-truetype is pure common lisp solution for antialiased TrueType font rendering using CLX and XRender extension.";
90           deps = with pkgs.lispPackages; [
91                   alexandria bordeaux-threads cl-aa cl-fad cl-paths cl-paths-ttf cl-store
92                           cl-vectors clx trivial-features zpb-ttf
93           ];
94           src = pkgs.fetchurl {
95                   url = "http://beta.quicklisp.org/archive/clx-truetype/2016-08-25/clx-truetype-20160825-git.tgz";
96                   sha256 = "0ndy067rg9w6636gxwlpnw7f3ck9nrnjb03444pprik9r3c9in67";
97           };
99           packageName = "clx-truetype";
101           asdFilesToKeep = ["clx-truetype.asd"];
102   };
103   cluffer = buildLispPackage rec {
104     baseName = "cluffer";
105     version = "2018-09-24";
107     buildSystems = [ "cluffer-base" "cluffer-simple-buffer" "cluffer-simple-line" "cluffer-standard-buffer" "cluffer-standard-line" "cluffer" ];
108     parasites = [ "cluffer-test" ];
110     description = "General purpose text-editor buffer";
111     deps = with pkgs.lispPackages; [
112       acclimation clump
113     ];
114     src = pkgs.fetchFromGitHub {
115       owner = "robert-strandh";
116       repo = "cluffer";
117       rev = "4aad29c276a58a593064e79972ee4d77cae0af4a";
118       sha256 = "1bcg13g7qb3dr8z50aihdjqa6miz5ivlc9wsj2csgv1km1mak2kj";
119       # date = 2018-09-24T04:45:36+02:00;
120     };
122     packageName = "cluffer";
124     asdFilesToKeep = [ "cluffer.asd" "cluffer-base.asd" "cluffer-simple-buffer.asd" "cluffer-simple-line.asd" "cluffer-standard-buffer.asd" "cluffer-standard-line.asd" ];
125   };
126   nyxt = pkgs.lispPackages.buildLispPackage rec {
127     baseName = "nyxt";
128     version = "2.2.4";
130     description = "Browser";
132     overrides = x: {
133       postInstall = ''
134         echo "Building nyxt binary"
135         (
136           source "$out/lib/common-lisp-settings"/*-shell-config.sh
137           cd "$out/lib/common-lisp"/*/
138           makeFlags="''${makeFlags:-}"
139           make LISP=common-lisp.sh NYXT_INTERNAL_QUICKLISP=false PREFIX="$out" $makeFlags all
140           make LISP=common-lisp.sh NYXT_INTERNAL_QUICKLISP=false PREFIX="$out" $makeFlags install
141           cp nyxt "$out/bin/nyxt"
142         )
143         NIX_LISP_PRELAUNCH_HOOK='
144           nix_lisp_build_system nyxt/gtk-application \
145            "(asdf/system:component-entry-point (asdf:find-system :nyxt/gtk-application))" \
146            "" "(format *error-output* \"Alien objects:~%~s~%\" sb-alien::*shared-objects*)"
147         ' "$out/bin/nyxt-lisp-launcher.sh"
148         cp "$out/lib/common-lisp/nyxt/nyxt" "$out/bin/"
149       '';
151       # Prevent nyxt from trying to obtain dependencies as submodules
152       makeFlags = [ "NYXT_SUBMODULES=false" ] ++ x.buildFlags or [];
154       patches = x.patches or [] ++ [
155         # Work around crash when opening _any_ URL
156         # https://github.com/atlas-engineer/nyxt/issues/1781
157         # https://github.com/NixOS/nixpkgs/issues/158005
158         (pkgs.fetchpatch {
159           name = "nyxt-webkit-disable-sandbox.patch";
160           url = "https://github.com/atlas-engineer/nyxt/commit/48ac0d8727f1ca1428188a1ab2c05b7be5f6cc51.patch";
161           sha256 = "0570mcfn5wmjha6jmfdgglp0w5b7rpfnv3flzn77clgbknwbxi0m";
162         })
163       ];
164     };
166     deps = with pkgs.lispPackages; [
167             alexandria
168             bordeaux-threads
169             calispel
170             cl-css
171             cl-json
172             cl-markup
173             cl-ppcre
174             cl-ppcre-unicode
175             cl-prevalence
176             closer-mop
177             cl-containers
178             cl-qrencode
179             clss
180             cluffer
181             moptilities
182             dexador
183             enchant
184             file-attributes
185             iolib
186             local-time
187             log4cl
188             lparallel
189             mk-string-metrics
190             osicat
191             parenscript
192             quri
193             serapeum
194             spinneret
195             str
196             plump
197             swank
198             trivia
199             trivial-clipboard
200             trivial-features
201             trivial-garbage
202             trivial-package-local-nicknames
203             trivial-types
204             unix-opts
205             cl-html-diff
206             hu_dot_dwim_dot_defclass-star
207             cl-custom-hash-table
208             fset
209             cl-cffi-gtk
210             cl-webkit2
211             cl-gobject-introspection
212     ];
213     src = pkgs.fetchFromGitHub {
214       owner = "atlas-engineer";
215       repo = "nyxt";
216       rev = version;
217       sha256 = "12l7ir3q29v06jx0zng5cvlbmap7p709ka3ik6x29lw334qshm9b";
218     };
220     packageName = "nyxt";
222     propagatedBuildInputs = [
223       pkgs.libressl.out
224       pkgs.webkitgtk
225       pkgs.sbcl
226     ];
227   };
229   mgl = buildLispPackage rec {
230     baseName = "mgl";
231     version = "2021-10-07";
232     description = "MGL is a machine learning library for backpropagation neural networks, boltzmann machines, gaussian processes and more";
233     deps = with pkgs.lispPackages; [
234       alexandria closer-mop array-operations lla cl-reexport mgl-mat mgl-pax
235       named-readtables pythonic-string-reader
236     ];
237     src = pkgs.fetchFromGitHub {
238       owner = "melisgl";
239       repo = "mgl";
240       rev = "e697791a9bcad3b6e7b3845246a2aa55238cfef7";
241       sha256 = "sha256:09sf7nq7nmf9q7bh3a5ygl2i2n0nhrx5fk2kv5ili0ckv7g9x72s";
242       # date = 2021-10-18T14:15+02:00
243     };
244     buildSystems = [ "mgl" "mgl/test" ];
245     packageName = "mgl";
246     parasites = [ "mgl/test" ];
247     asdFilesToKeep = [ "mgl.asd" "mgl-example.asd" "gnuplot/mgl-gnuplot.asd" "visuals/mgl-visuals.asd" ];
248   };
250   mgl-mat = buildLispPackage rec {
251     baseName = "mgl-mat";
252     version = "2021-10-11";
253     description = "Multi-dimensional arrays with FFI/CUDA support";
254     deps = with pkgs.lispPackages; [
255       alexandria bordeaux-threads cffi cffi-grovel cl-cuda flexi-streams ieee-floats
256       lla mgl-pax static-vectors trivial-garbage cl-fad
257     ];
258     src = pkgs.fetchFromGitHub {
259       owner = "melisgl";
260       repo = "mgl-mat";
261       rev = "3710858bc876b1b86e50f1db2abe719e92d810e7";
262       sha256 = "sha256:1aa2382mi55rp8pd31dz4d94yhfzh30vkggcvmvdfrr4ngffj0dx";
263       # date = 2021-10-18T14:15+02:00
264     };
265     packageName = "mgl-mat";
266     buildSystems = [ "mgl-mat" "mgl-mat/test" ];
267     parasites = [ "mgl-mat/test" ];
268     asdFilesToKeep = [ "mgl-mat.asd" ];
269   };
272 in lispPackages