mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
quicklispPackages: init
The idea is to have an almost-automatic conversion from QuickLisp, the definitive Common Lisp package repository, to Nix. The benefit over just using lispPackages.quicklisp is automatic installation of non-Lisp dependencies from NixPkgs (and integration with Nix package management). The benefit over lispPackages for normal Lisp packages is packaging just a snapshot of QuickLisp which is known to be tested for version compatibility between libraries. There are some packages in lispPackages that are not from QuickLisp (for example, the installable wrapper of QuickLisp itself). My hope is to replace the rest with the expressions converted from QuickLisp. Note that the current commit is a mere addition.
This commit is contained in:
parent
eb70ae34b1
commit
13007957e5
@ -34,7 +34,7 @@ url="${ql_src##* }"
|
||||
|
||||
[ "$ql_src_type" = "kmr-git" ] && {
|
||||
ql_src_type=git
|
||||
url="http://git.b9.com/$url.git"
|
||||
url="http://git.kpe.io/$url.git"
|
||||
export NIX_PREFETCH_GIT_DEEP_CLONE=1
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,14 @@
|
||||
{ fetchurl }:
|
||||
rec {
|
||||
baseName = ''agnostic-lizard'';
|
||||
version = ''20170227-git'';
|
||||
|
||||
description = ''A portable code walker that makes a best effort to be correct in most cases'';
|
||||
|
||||
deps = [ ];
|
||||
|
||||
src = fetchurl {
|
||||
url = ''http://beta.quicklisp.org/archive/agnostic-lizard/2017-02-27/agnostic-lizard-20170227-git.tgz'';
|
||||
sha256 = ''0gnbxfdz35z9kznnhnj9x5zzn25k1x2ifv4v9rkzb0xmi7xkx9wi'';
|
||||
};
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
args @ { fetchurl, ... }:
|
||||
rec {
|
||||
baseName = ''alexandria'';
|
||||
version = ''20170227-git'';
|
||||
|
||||
description = ''Alexandria is a collection of portable public domain utilities.'';
|
||||
|
||||
deps = [ ];
|
||||
|
||||
src = fetchurl {
|
||||
url = ''http://beta.quicklisp.org/archive/alexandria/2017-02-27/alexandria-20170227-git.tgz'';
|
||||
sha256 = ''0gnn4ysyvqf8wfi94kh6x23iwx3czaicam1lz9pnwsv40ws5fwwh'';
|
||||
};
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
args @ { fetchurl, ... }:
|
||||
rec {
|
||||
baseName = ''babel'';
|
||||
version = ''20150608-git'';
|
||||
|
||||
description = ''Babel, a charset conversion library.'';
|
||||
|
||||
deps = [ args."trivial-features" args."alexandria" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = ''http://beta.quicklisp.org/archive/babel/2015-06-08/babel-20150608-git.tgz'';
|
||||
sha256 = ''0nv2w7k33rwc4dwi33ay2rkmvnj4vsz9ar27z8fiar34895vndk5'';
|
||||
};
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
args @ { fetchurl, ... }:
|
||||
rec {
|
||||
baseName = ''bordeaux-threads'';
|
||||
version = ''v0.8.5'';
|
||||
|
||||
description = ''Bordeaux Threads makes writing portable multi-threaded apps simple'';
|
||||
|
||||
deps = [ args."alexandria" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = ''http://beta.quicklisp.org/archive/bordeaux-threads/2016-03-18/bordeaux-threads-v0.8.5.tgz'';
|
||||
sha256 = ''09q1xd3fca6ln6mh45cx24xzkrcnvhgl5nn9g2jv0rwj1m2xvbpd'';
|
||||
};
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
args @ { fetchurl, ... }:
|
||||
rec {
|
||||
baseName = ''cffi'';
|
||||
version = ''cffi_0.18.0'';
|
||||
|
||||
description = ''The Common Foreign Function Interface'';
|
||||
|
||||
deps = [ args."uiop" args."alexandria" args."trivial-features" args."babel" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = ''http://beta.quicklisp.org/archive/cffi/2016-10-31/cffi_0.18.0.tgz'';
|
||||
sha256 = ''0g4clx9l9c7iw9hiv94ihzp4zb80yq3i5j6lr3vkz9z2dndzcpzz'';
|
||||
};
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
args @ { fetchurl, ... }:
|
||||
rec {
|
||||
baseName = ''chunga'';
|
||||
version = ''1.1.6'';
|
||||
|
||||
description = '''';
|
||||
|
||||
deps = [ args."trivial-gray-streams" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = ''http://beta.quicklisp.org/archive/chunga/2014-12-17/chunga-1.1.6.tgz'';
|
||||
sha256 = ''1ivdfi9hjkzp2anhpjm58gzrjpn6mdsp35km115c1j1c4yhs9lzg'';
|
||||
};
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
args @ { fetchurl, ... }:
|
||||
rec {
|
||||
baseName = ''cl+ssl'';
|
||||
version = ''cl+ssl-20161208-git'';
|
||||
|
||||
description = ''Common Lisp interface to OpenSSL.'';
|
||||
|
||||
deps = [ args."cffi" args."trivial-gray-streams" args."flexi-streams" args."bordeaux-threads" args."trivial-garbage" args."uiop" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = ''http://beta.quicklisp.org/archive/cl+ssl/2016-12-08/cl+ssl-20161208-git.tgz'';
|
||||
sha256 = ''0x9xa2rdfh9gxp5m27cj0wvzjqccz4w5cvm7nbk5shwsz5xgr7hs'';
|
||||
};
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
args @ { fetchurl, ... }:
|
||||
rec {
|
||||
baseName = ''cl-base64'';
|
||||
version = ''20150923-git'';
|
||||
|
||||
description = ''Base64 encoding and decoding with URI support.'';
|
||||
|
||||
deps = [ ];
|
||||
|
||||
src = fetchurl {
|
||||
url = ''http://beta.quicklisp.org/archive/cl-base64/2015-09-23/cl-base64-20150923-git.tgz'';
|
||||
sha256 = ''0haip5x0091r9xa8gdzr21s0rk432998nbxxfys35lhnyc1vgyhp'';
|
||||
};
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
args @ { fetchurl, ... }:
|
||||
rec {
|
||||
baseName = ''cl-fad'';
|
||||
version = ''0.7.4'';
|
||||
|
||||
description = ''Portable pathname library'';
|
||||
|
||||
deps = [ args."bordeaux-threads" args."alexandria" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = ''http://beta.quicklisp.org/archive/cl-fad/2016-08-25/cl-fad-0.7.4.tgz'';
|
||||
sha256 = ''1avp5j66vrpv5symgw4n4szlc2cyqz4haa0cxzy1pl8p0a8k0v9x'';
|
||||
};
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
args @ { fetchurl, ... }:
|
||||
rec {
|
||||
baseName = ''cl-fuse'';
|
||||
version = ''20160318-git'';
|
||||
|
||||
description = ''CFFI bindings to FUSE (Filesystem in user space)'';
|
||||
|
||||
deps = [ args."cffi" args."cl-utilities" args."bordeaux-threads" args."trivial-backtrace" args."iterate" args."trivial-utf-8" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = ''http://beta.quicklisp.org/archive/cl-fuse/2016-03-18/cl-fuse-20160318-git.tgz'';
|
||||
sha256 = ''1yllmnnhqp42s37a2y7h7vph854xgna62l1pidvlyskc90bl5jf6'';
|
||||
};
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
args @ { fetchurl, ... }:
|
||||
rec {
|
||||
baseName = ''cl-ppcre'';
|
||||
version = ''2.0.11'';
|
||||
|
||||
description = ''Perl-compatible regular expression library'';
|
||||
|
||||
deps = [ ];
|
||||
|
||||
src = fetchurl {
|
||||
url = ''http://beta.quicklisp.org/archive/cl-ppcre/2015-09-23/cl-ppcre-2.0.11.tgz'';
|
||||
sha256 = ''1djciws9n0jg3qdrck3j4wj607zvkbir8p379mp0p7b5g0glwvb2'';
|
||||
};
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
args @ { fetchurl, ... }:
|
||||
rec {
|
||||
baseName = ''cl-utilities'';
|
||||
version = ''1.2.4'';
|
||||
|
||||
description = '''';
|
||||
|
||||
deps = [ ];
|
||||
|
||||
src = fetchurl {
|
||||
url = ''http://beta.quicklisp.org/archive/cl-utilities/2010-10-06/cl-utilities-1.2.4.tgz'';
|
||||
sha256 = ''1z2ippnv2wgyxpz15zpif7j7sp1r20fkjhm4n6am2fyp6a3k3a87'';
|
||||
};
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
args @ { fetchurl, ... }:
|
||||
rec {
|
||||
baseName = ''clx'';
|
||||
version = ''20170227-git'';
|
||||
|
||||
description = ''An implementation of the X Window System protocol in Lisp.'';
|
||||
|
||||
deps = [ ];
|
||||
|
||||
src = fetchurl {
|
||||
url = ''http://beta.quicklisp.org/archive/clx/2017-02-27/clx-20170227-git.tgz'';
|
||||
sha256 = ''0zgp1yqy0lm528bhil93ap7df01qdyfhnbxhckjv87xk8rs0g5nx'';
|
||||
};
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
args @ { fetchurl, ... }:
|
||||
rec {
|
||||
baseName = ''esrap'';
|
||||
version = ''20170124-git'';
|
||||
|
||||
description = ''A Packrat / Parsing Grammar / TDPL parser for Common Lisp.'';
|
||||
|
||||
deps = [ args."alexandria" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = ''http://beta.quicklisp.org/archive/esrap/2017-01-24/esrap-20170124-git.tgz'';
|
||||
sha256 = ''1182011bbhvkw2qsdqrccl879vf5k7bcda318n0xskk35hzircp8'';
|
||||
};
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
args @ { fetchurl, ... }:
|
||||
rec {
|
||||
baseName = ''flexi-streams'';
|
||||
version = ''1.0.15'';
|
||||
|
||||
description = ''Flexible bivalent streams for Common Lisp'';
|
||||
|
||||
deps = [ args."trivial-gray-streams" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = ''http://beta.quicklisp.org/archive/flexi-streams/2015-07-09/flexi-streams-1.0.15.tgz'';
|
||||
sha256 = ''0zkx335winqs7xigbmxhhkhcsfa9hjhf1q6r4q710y29fbhpc37p'';
|
||||
};
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
args @ { fetchurl, ... }:
|
||||
rec {
|
||||
baseName = ''hunchentoot'';
|
||||
version = ''1.2.35'';
|
||||
|
||||
description = ''Hunchentoot is a HTTP server based on USOCKET and
|
||||
BORDEAUX-THREADS. It supports HTTP 1.1, serves static files, has a
|
||||
simple framework for user-defined handlers and can be extended
|
||||
through subclassing.'';
|
||||
|
||||
deps = [ args."chunga" args."cl-base64" args."cl-fad" args."cl-ppcre" args."flexi-streams" args."cl+ssl" args."md5" args."rfc2388" args."trivial-backtrace" args."usocket" args."bordeaux-threads" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = ''http://beta.quicklisp.org/archive/hunchentoot/2016-03-18/hunchentoot-1.2.35.tgz'';
|
||||
sha256 = ''0gp2rgndkijjydb1x3p8414ii1z372gzdy945jy0491bcbhygj74'';
|
||||
};
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
args @ { fetchurl, ... }:
|
||||
rec {
|
||||
baseName = ''iterate'';
|
||||
version = ''20160825-darcs'';
|
||||
|
||||
description = ''Jonathan Amsterdam's iterator/gatherer/accumulator facility'';
|
||||
|
||||
deps = [ ];
|
||||
|
||||
src = fetchurl {
|
||||
url = ''http://beta.quicklisp.org/archive/iterate/2016-08-25/iterate-20160825-darcs.tgz'';
|
||||
sha256 = ''0kvz16gnxnkdz0fy1x8y5yr28nfm7i2qpvix7mgwccdpjmsb4pgm'';
|
||||
};
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
args @ { fetchurl, ... }:
|
||||
rec {
|
||||
baseName = ''md5'';
|
||||
version = ''20150804-git'';
|
||||
|
||||
description = ''The MD5 Message-Digest Algorithm RFC 1321'';
|
||||
|
||||
deps = [ ];
|
||||
|
||||
src = fetchurl {
|
||||
url = ''http://beta.quicklisp.org/archive/md5/2015-08-04/md5-20150804-git.tgz'';
|
||||
sha256 = ''1sf79pjip19sx7zmznz1wm4563qc208lq49m0jnhxbv09wmm4vc5'';
|
||||
};
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
args @ { fetchurl, ... }:
|
||||
rec {
|
||||
baseName = ''rfc2388'';
|
||||
version = ''20130720-git'';
|
||||
|
||||
description = ''Implementation of RFC 2388'';
|
||||
|
||||
deps = [ ];
|
||||
|
||||
src = fetchurl {
|
||||
url = ''http://beta.quicklisp.org/archive/rfc2388/2013-07-20/rfc2388-20130720-git.tgz'';
|
||||
sha256 = ''1ky99cr4bgfyh0pfpl5f6fsmq1qdbgi4b8v0cfs4y73f78p1f8b6'';
|
||||
};
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
args @ { fetchurl, ... }:
|
||||
rec {
|
||||
baseName = ''split-sequence'';
|
||||
version = ''1.2'';
|
||||
|
||||
description = ''Splits a sequence into a list of subsequences
|
||||
delimited by objects satisfying a test.'';
|
||||
|
||||
deps = [ ];
|
||||
|
||||
src = fetchurl {
|
||||
url = ''http://beta.quicklisp.org/archive/split-sequence/2015-08-04/split-sequence-1.2.tgz'';
|
||||
sha256 = ''12x5yfvinqz9jzxwlsg226103a9sdf67zpzn5izggvdlw0v5qp0l'';
|
||||
};
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
args @ { fetchurl, ... }:
|
||||
rec {
|
||||
baseName = ''stumpwm'';
|
||||
version = ''20170227-git'';
|
||||
|
||||
description = ''A tiling, keyboard driven window manager'';
|
||||
|
||||
deps = [ args."alexandria" args."cl-ppcre" args."clx" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = ''http://beta.quicklisp.org/archive/stumpwm/2017-02-27/stumpwm-20170227-git.tgz'';
|
||||
sha256 = ''0w1arw1x5hsw0w6rc1ls4bf7gf8cjcm6ar68kp74zczp0y35fign'';
|
||||
};
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
args @ { fetchurl, ... }:
|
||||
rec {
|
||||
baseName = ''trivial-backtrace'';
|
||||
version = ''20160531-git'';
|
||||
|
||||
description = ''trivial-backtrace'';
|
||||
|
||||
deps = [ ];
|
||||
|
||||
src = fetchurl {
|
||||
url = ''http://beta.quicklisp.org/archive/trivial-backtrace/2016-05-31/trivial-backtrace-20160531-git.tgz'';
|
||||
sha256 = ''1vcvalcv2ljiv2gyh8xjcg62cjsripjwmnhc8zji35ja1xyqvxhx'';
|
||||
};
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
args @ { fetchurl, ... }:
|
||||
rec {
|
||||
baseName = ''trivial-features'';
|
||||
version = ''20161204-git'';
|
||||
|
||||
description = ''Ensures consistent *FEATURES* across multiple CLs.'';
|
||||
|
||||
deps = [ ];
|
||||
|
||||
src = fetchurl {
|
||||
url = ''http://beta.quicklisp.org/archive/trivial-features/2016-12-04/trivial-features-20161204-git.tgz'';
|
||||
sha256 = ''0i2zyc9c7jigljxll29sh9gv1fawdsf0kq7s86pwba5zi99q2ij2'';
|
||||
};
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
args @ { fetchurl, ... }:
|
||||
rec {
|
||||
baseName = ''trivial-garbage'';
|
||||
version = ''20150113-git'';
|
||||
|
||||
description = ''Portable finalizers, weak hash-tables and weak pointers.'';
|
||||
|
||||
deps = [ ];
|
||||
|
||||
src = fetchurl {
|
||||
url = ''http://beta.quicklisp.org/archive/trivial-garbage/2015-01-13/trivial-garbage-20150113-git.tgz'';
|
||||
sha256 = ''1yy1jyx7wz5rr7lr0jyyfxgzfddmrxrmkp46a21pcdc4jlss1h08'';
|
||||
};
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
args @ { fetchurl, ... }:
|
||||
rec {
|
||||
baseName = ''trivial-gray-streams'';
|
||||
version = ''20140826-git'';
|
||||
|
||||
description = ''Compatibility layer for Gray Streams (see http://www.cliki.net/Gray%20streams).'';
|
||||
|
||||
deps = [ ];
|
||||
|
||||
src = fetchurl {
|
||||
url = ''http://beta.quicklisp.org/archive/trivial-gray-streams/2014-08-26/trivial-gray-streams-20140826-git.tgz'';
|
||||
sha256 = ''1nhbp0qizvqvy2mfl3i99hlwiy27h3gq0jglwzsj2fmnwqvpfx92'';
|
||||
};
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
args @ { fetchurl, ... }:
|
||||
rec {
|
||||
baseName = ''trivial-utf-8'';
|
||||
version = ''20111001-darcs'';
|
||||
|
||||
description = '''';
|
||||
|
||||
deps = [ ];
|
||||
|
||||
src = fetchurl {
|
||||
url = ''http://beta.quicklisp.org/archive/trivial-utf-8/2011-10-01/trivial-utf-8-20111001-darcs.tgz'';
|
||||
sha256 = ''1lmg185s6w3rzsz3xa41k5w9xw32bi288ifhrxincy8iv92w65wb'';
|
||||
};
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
args @ { fetchurl, ... }:
|
||||
rec {
|
||||
baseName = ''uiop'';
|
||||
version = ''3.2.0'';
|
||||
|
||||
description = '''';
|
||||
|
||||
deps = [ ];
|
||||
|
||||
src = fetchurl {
|
||||
url = ''http://beta.quicklisp.org/archive/uiop/2017-01-24/uiop-3.2.0.tgz'';
|
||||
sha256 = ''1rrn1mdcb4dmb517vrp3nzwpp1w8hfvpzarj36c7kkpjq23czdig'';
|
||||
};
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
args @ { fetchurl, ... }:
|
||||
rec {
|
||||
baseName = ''usocket'';
|
||||
version = ''0.7.0.1'';
|
||||
|
||||
description = ''Universal socket library for Common Lisp'';
|
||||
|
||||
deps = [ args."split-sequence" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = ''http://beta.quicklisp.org/archive/usocket/2016-10-31/usocket-0.7.0.1.tgz'';
|
||||
sha256 = ''1mpcfawbzd72cd841bb0hmgx4kinnvcnazc7vym83gv5iy6lwif2'';
|
||||
};
|
||||
}
|
20
pkgs/development/lisp-modules/quicklisp-to-nix-overrides.nix
Normal file
20
pkgs/development/lisp-modules/quicklisp-to-nix-overrides.nix
Normal file
@ -0,0 +1,20 @@
|
||||
{pkgs, buildLispPackage, quicklisp-to-nix-packages}:
|
||||
{
|
||||
iterate = x: {
|
||||
overrides = x: {
|
||||
configurePhase="buildPhase(){ true; }";
|
||||
};
|
||||
};
|
||||
cl-fuse = x: {
|
||||
propagatedBuildInputs = [pkgs.fuse];
|
||||
overrides = x : {
|
||||
configurePhase = ''
|
||||
export CL_SOURCE_REGISTRY="$CL_SOURCE_REGISTRY:$PWD"
|
||||
export makeFlags="$makeFlags LISP=common-lisp.sh"
|
||||
'';
|
||||
};
|
||||
};
|
||||
hunchentoot = x: {
|
||||
propagatedBuildInputs = [pkgs.openssl];
|
||||
};
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
stumpwm
|
||||
cl-fuse
|
||||
esrap
|
||||
hunchentoot
|
291
pkgs/development/lisp-modules/quicklisp-to-nix.nix
Normal file
291
pkgs/development/lisp-modules/quicklisp-to-nix.nix
Normal file
@ -0,0 +1,291 @@
|
||||
{stdenv, fetchurl, pkgs, clwrapper}:
|
||||
let quicklisp-to-nix-packages = rec {
|
||||
inherit stdenv fetchurl clwrapper pkgs quicklisp-to-nix-packages;
|
||||
|
||||
callPackage = pkgs.lib.callPackageWith quicklisp-to-nix-packages;
|
||||
buildLispPackage = callPackage ./define-package.nix;
|
||||
qlOverrides = callPackage ./quicklisp-to-nix-overrides.nix {};
|
||||
|
||||
"split-sequence" = buildLispPackage
|
||||
((f: x: (x // (f x)))
|
||||
(qlOverrides."split-sequence" or (x: {}))
|
||||
(import ./quicklisp-to-nix-output/split-sequence.nix {
|
||||
inherit fetchurl;
|
||||
|
||||
}));
|
||||
|
||||
|
||||
"trivial-garbage" = buildLispPackage
|
||||
((f: x: (x // (f x)))
|
||||
(qlOverrides."trivial-garbage" or (x: {}))
|
||||
(import ./quicklisp-to-nix-output/trivial-garbage.nix {
|
||||
inherit fetchurl;
|
||||
|
||||
}));
|
||||
|
||||
|
||||
"trivial-gray-streams" = buildLispPackage
|
||||
((f: x: (x // (f x)))
|
||||
(qlOverrides."trivial-gray-streams" or (x: {}))
|
||||
(import ./quicklisp-to-nix-output/trivial-gray-streams.nix {
|
||||
inherit fetchurl;
|
||||
|
||||
}));
|
||||
|
||||
|
||||
"babel" = buildLispPackage
|
||||
((f: x: (x // (f x)))
|
||||
(qlOverrides."babel" or (x: {}))
|
||||
(import ./quicklisp-to-nix-output/babel.nix {
|
||||
inherit fetchurl;
|
||||
"trivial-features" = quicklisp-to-nix-packages."trivial-features";
|
||||
"alexandria" = quicklisp-to-nix-packages."alexandria";
|
||||
|
||||
}));
|
||||
|
||||
|
||||
"trivial-features" = buildLispPackage
|
||||
((f: x: (x // (f x)))
|
||||
(qlOverrides."trivial-features" or (x: {}))
|
||||
(import ./quicklisp-to-nix-output/trivial-features.nix {
|
||||
inherit fetchurl;
|
||||
|
||||
}));
|
||||
|
||||
|
||||
"uiop" = buildLispPackage
|
||||
((f: x: (x // (f x)))
|
||||
(qlOverrides."uiop" or (x: {}))
|
||||
(import ./quicklisp-to-nix-output/uiop.nix {
|
||||
inherit fetchurl;
|
||||
|
||||
}));
|
||||
|
||||
|
||||
"usocket" = buildLispPackage
|
||||
((f: x: (x // (f x)))
|
||||
(qlOverrides."usocket" or (x: {}))
|
||||
(import ./quicklisp-to-nix-output/usocket.nix {
|
||||
inherit fetchurl;
|
||||
"split-sequence" = quicklisp-to-nix-packages."split-sequence";
|
||||
|
||||
}));
|
||||
|
||||
|
||||
"rfc2388" = buildLispPackage
|
||||
((f: x: (x // (f x)))
|
||||
(qlOverrides."rfc2388" or (x: {}))
|
||||
(import ./quicklisp-to-nix-output/rfc2388.nix {
|
||||
inherit fetchurl;
|
||||
|
||||
}));
|
||||
|
||||
|
||||
"md5" = buildLispPackage
|
||||
((f: x: (x // (f x)))
|
||||
(qlOverrides."md5" or (x: {}))
|
||||
(import ./quicklisp-to-nix-output/md5.nix {
|
||||
inherit fetchurl;
|
||||
|
||||
}));
|
||||
|
||||
|
||||
"cl+ssl" = buildLispPackage
|
||||
((f: x: (x // (f x)))
|
||||
(qlOverrides."cl+ssl" or (x: {}))
|
||||
(import ./quicklisp-to-nix-output/cl+ssl.nix {
|
||||
inherit fetchurl;
|
||||
"cffi" = quicklisp-to-nix-packages."cffi";
|
||||
"trivial-gray-streams" = quicklisp-to-nix-packages."trivial-gray-streams";
|
||||
"flexi-streams" = quicklisp-to-nix-packages."flexi-streams";
|
||||
"bordeaux-threads" = quicklisp-to-nix-packages."bordeaux-threads";
|
||||
"trivial-garbage" = quicklisp-to-nix-packages."trivial-garbage";
|
||||
"uiop" = quicklisp-to-nix-packages."uiop";
|
||||
|
||||
}));
|
||||
|
||||
|
||||
"flexi-streams" = buildLispPackage
|
||||
((f: x: (x // (f x)))
|
||||
(qlOverrides."flexi-streams" or (x: {}))
|
||||
(import ./quicklisp-to-nix-output/flexi-streams.nix {
|
||||
inherit fetchurl;
|
||||
"trivial-gray-streams" = quicklisp-to-nix-packages."trivial-gray-streams";
|
||||
|
||||
}));
|
||||
|
||||
|
||||
"cl-fad" = buildLispPackage
|
||||
((f: x: (x // (f x)))
|
||||
(qlOverrides."cl-fad" or (x: {}))
|
||||
(import ./quicklisp-to-nix-output/cl-fad.nix {
|
||||
inherit fetchurl;
|
||||
"bordeaux-threads" = quicklisp-to-nix-packages."bordeaux-threads";
|
||||
"alexandria" = quicklisp-to-nix-packages."alexandria";
|
||||
|
||||
}));
|
||||
|
||||
|
||||
"cl-base64" = buildLispPackage
|
||||
((f: x: (x // (f x)))
|
||||
(qlOverrides."cl-base64" or (x: {}))
|
||||
(import ./quicklisp-to-nix-output/cl-base64.nix {
|
||||
inherit fetchurl;
|
||||
|
||||
}));
|
||||
|
||||
|
||||
"chunga" = buildLispPackage
|
||||
((f: x: (x // (f x)))
|
||||
(qlOverrides."chunga" or (x: {}))
|
||||
(import ./quicklisp-to-nix-output/chunga.nix {
|
||||
inherit fetchurl;
|
||||
"trivial-gray-streams" = quicklisp-to-nix-packages."trivial-gray-streams";
|
||||
|
||||
}));
|
||||
|
||||
|
||||
"trivial-utf-8" = buildLispPackage
|
||||
((f: x: (x // (f x)))
|
||||
(qlOverrides."trivial-utf-8" or (x: {}))
|
||||
(import ./quicklisp-to-nix-output/trivial-utf-8.nix {
|
||||
inherit fetchurl;
|
||||
|
||||
}));
|
||||
|
||||
|
||||
"iterate" = buildLispPackage
|
||||
((f: x: (x // (f x)))
|
||||
(qlOverrides."iterate" or (x: {}))
|
||||
(import ./quicklisp-to-nix-output/iterate.nix {
|
||||
inherit fetchurl;
|
||||
|
||||
}));
|
||||
|
||||
|
||||
"trivial-backtrace" = buildLispPackage
|
||||
((f: x: (x // (f x)))
|
||||
(qlOverrides."trivial-backtrace" or (x: {}))
|
||||
(import ./quicklisp-to-nix-output/trivial-backtrace.nix {
|
||||
inherit fetchurl;
|
||||
|
||||
}));
|
||||
|
||||
|
||||
"bordeaux-threads" = buildLispPackage
|
||||
((f: x: (x // (f x)))
|
||||
(qlOverrides."bordeaux-threads" or (x: {}))
|
||||
(import ./quicklisp-to-nix-output/bordeaux-threads.nix {
|
||||
inherit fetchurl;
|
||||
"alexandria" = quicklisp-to-nix-packages."alexandria";
|
||||
|
||||
}));
|
||||
|
||||
|
||||
"cl-utilities" = buildLispPackage
|
||||
((f: x: (x // (f x)))
|
||||
(qlOverrides."cl-utilities" or (x: {}))
|
||||
(import ./quicklisp-to-nix-output/cl-utilities.nix {
|
||||
inherit fetchurl;
|
||||
|
||||
}));
|
||||
|
||||
|
||||
"cffi" = buildLispPackage
|
||||
((f: x: (x // (f x)))
|
||||
(qlOverrides."cffi" or (x: {}))
|
||||
(import ./quicklisp-to-nix-output/cffi.nix {
|
||||
inherit fetchurl;
|
||||
"uiop" = quicklisp-to-nix-packages."uiop";
|
||||
"alexandria" = quicklisp-to-nix-packages."alexandria";
|
||||
"trivial-features" = quicklisp-to-nix-packages."trivial-features";
|
||||
"babel" = quicklisp-to-nix-packages."babel";
|
||||
|
||||
}));
|
||||
|
||||
|
||||
"clx" = buildLispPackage
|
||||
((f: x: (x // (f x)))
|
||||
(qlOverrides."clx" or (x: {}))
|
||||
(import ./quicklisp-to-nix-output/clx.nix {
|
||||
inherit fetchurl;
|
||||
|
||||
}));
|
||||
|
||||
|
||||
"cl-ppcre" = buildLispPackage
|
||||
((f: x: (x // (f x)))
|
||||
(qlOverrides."cl-ppcre" or (x: {}))
|
||||
(import ./quicklisp-to-nix-output/cl-ppcre.nix {
|
||||
inherit fetchurl;
|
||||
|
||||
}));
|
||||
|
||||
|
||||
"alexandria" = buildLispPackage
|
||||
((f: x: (x // (f x)))
|
||||
(qlOverrides."alexandria" or (x: {}))
|
||||
(import ./quicklisp-to-nix-output/alexandria.nix {
|
||||
inherit fetchurl;
|
||||
|
||||
}));
|
||||
|
||||
|
||||
"hunchentoot" = buildLispPackage
|
||||
((f: x: (x // (f x)))
|
||||
(qlOverrides."hunchentoot" or (x: {}))
|
||||
(import ./quicklisp-to-nix-output/hunchentoot.nix {
|
||||
inherit fetchurl;
|
||||
"chunga" = quicklisp-to-nix-packages."chunga";
|
||||
"cl-base64" = quicklisp-to-nix-packages."cl-base64";
|
||||
"cl-fad" = quicklisp-to-nix-packages."cl-fad";
|
||||
"cl-ppcre" = quicklisp-to-nix-packages."cl-ppcre";
|
||||
"flexi-streams" = quicklisp-to-nix-packages."flexi-streams";
|
||||
"cl+ssl" = quicklisp-to-nix-packages."cl+ssl";
|
||||
"md5" = quicklisp-to-nix-packages."md5";
|
||||
"rfc2388" = quicklisp-to-nix-packages."rfc2388";
|
||||
"trivial-backtrace" = quicklisp-to-nix-packages."trivial-backtrace";
|
||||
"usocket" = quicklisp-to-nix-packages."usocket";
|
||||
"bordeaux-threads" = quicklisp-to-nix-packages."bordeaux-threads";
|
||||
|
||||
}));
|
||||
|
||||
|
||||
"esrap" = buildLispPackage
|
||||
((f: x: (x // (f x)))
|
||||
(qlOverrides."esrap" or (x: {}))
|
||||
(import ./quicklisp-to-nix-output/esrap.nix {
|
||||
inherit fetchurl;
|
||||
"alexandria" = quicklisp-to-nix-packages."alexandria";
|
||||
|
||||
}));
|
||||
|
||||
|
||||
"cl-fuse" = buildLispPackage
|
||||
((f: x: (x // (f x)))
|
||||
(qlOverrides."cl-fuse" or (x: {}))
|
||||
(import ./quicklisp-to-nix-output/cl-fuse.nix {
|
||||
inherit fetchurl;
|
||||
"cffi" = quicklisp-to-nix-packages."cffi";
|
||||
"cl-utilities" = quicklisp-to-nix-packages."cl-utilities";
|
||||
"bordeaux-threads" = quicklisp-to-nix-packages."bordeaux-threads";
|
||||
"trivial-backtrace" = quicklisp-to-nix-packages."trivial-backtrace";
|
||||
"iterate" = quicklisp-to-nix-packages."iterate";
|
||||
"trivial-utf-8" = quicklisp-to-nix-packages."trivial-utf-8";
|
||||
|
||||
}));
|
||||
|
||||
|
||||
"stumpwm" = buildLispPackage
|
||||
((f: x: (x // (f x)))
|
||||
(qlOverrides."stumpwm" or (x: {}))
|
||||
(import ./quicklisp-to-nix-output/stumpwm.nix {
|
||||
inherit fetchurl;
|
||||
"alexandria" = quicklisp-to-nix-packages."alexandria";
|
||||
"cl-ppcre" = quicklisp-to-nix-packages."cl-ppcre";
|
||||
"clx" = quicklisp-to-nix-packages."clx";
|
||||
|
||||
}));
|
||||
|
||||
|
||||
}; in quicklisp-to-nix-packages
|
@ -0,0 +1,8 @@
|
||||
"<% @var name %>" = buildLispPackage
|
||||
((f: x: (x // (f x)))
|
||||
(qlOverrides."<% @var name %>" or (x: {}))
|
||||
(import ./quicklisp-to-nix-output/<% @var name %>.nix {
|
||||
inherit fetchurl;
|
||||
<% @loop deps %>"<% @var name %>" = quicklisp-to-nix-packages."<% @var name %>";
|
||||
<% @endloop %>
|
||||
}));
|
@ -0,0 +1,14 @@
|
||||
args @ { fetchurl, ... }:
|
||||
rec {
|
||||
baseName = ''<% @var name %>'';
|
||||
version = ''<% @var version %>'';
|
||||
|
||||
description = ''<% @var description %>'';
|
||||
|
||||
deps = [ <% @loop deps %>args."<% @var name %>" <% @endloop %>];
|
||||
|
||||
src = fetchurl {
|
||||
url = ''<% @var url %>'';
|
||||
sha256 = ''<% @var sha256 %>'';
|
||||
};
|
||||
}
|
124
pkgs/development/lisp-modules/quicklisp-to-nix/ql-to-nix.lisp
Normal file
124
pkgs/development/lisp-modules/quicklisp-to-nix/ql-to-nix.lisp
Normal file
@ -0,0 +1,124 @@
|
||||
; QuickLisp-to-Nix export
|
||||
; Requires QuickLisp to be loaded
|
||||
; Installs the QuickLisp version of all the packages processed (in the
|
||||
; QuickLisp instance it uses)
|
||||
|
||||
(ql:quickload :cl-emb)
|
||||
(ql:quickload :external-program)
|
||||
(ql:quickload :cl-ppcre)
|
||||
(ql:quickload :md5)
|
||||
(ql:quickload :alexandria)
|
||||
|
||||
(defun nix-prefetch-url (url)
|
||||
(let*
|
||||
((stdout nil)
|
||||
(stderr nil))
|
||||
(setf
|
||||
stdout
|
||||
(with-output-to-string (so)
|
||||
(setf
|
||||
stderr
|
||||
(with-output-to-string (se)
|
||||
(external-program:run
|
||||
"nix-prefetch-url"
|
||||
(list url)
|
||||
:search t :output so :error se)))))
|
||||
(let*
|
||||
((path-line (first (last (cl-ppcre:split (format nil "~%") stderr))))
|
||||
(path (cl-ppcre:regex-replace-all "path is .(.*)." path-line "\\1")))
|
||||
(list
|
||||
:sha256 (first (cl-ppcre:split (format nil "~%") stdout))
|
||||
:path path
|
||||
:md5 (string-downcase
|
||||
(format nil "~{~16,2,'0r~}"
|
||||
(map 'list 'identity (md5:md5sum-file path))))))))
|
||||
|
||||
(defun system-data (system)
|
||||
(ql:quickload system)
|
||||
(let*
|
||||
((asdf-system (asdf:find-system system))
|
||||
(ql-system (ql-dist:find-system system))
|
||||
(ql-release (ql-dist:release ql-system))
|
||||
(url (ql-dist:archive-url ql-release))
|
||||
(local-archive (ql-dist:local-archive-file ql-release))
|
||||
(local-url (format nil "file://~a" (pathname local-archive)))
|
||||
(archive-data
|
||||
(progn
|
||||
(ql-dist:ensure-local-archive-file ql-release)
|
||||
(nix-prefetch-url local-url)))
|
||||
(ideal-md5 (ql-dist:archive-md5 ql-release))
|
||||
(file-md5 (getf archive-data :md5))
|
||||
(raw-dependencies (asdf:system-depends-on asdf-system))
|
||||
(dependencies (remove-if-not 'ql-dist:find-system raw-dependencies))
|
||||
(deps (mapcar (lambda (x) (list :name x)) dependencies))
|
||||
(name (string-downcase (format nil "~a" system)))
|
||||
(description (asdf:system-description asdf-system))
|
||||
(release-name (ql-dist:short-description ql-release))
|
||||
(version (cl-ppcre:regex-replace-all
|
||||
(format nil "~a-" name) release-name "")))
|
||||
(assert (equal ideal-md5 file-md5))
|
||||
(list
|
||||
:system system
|
||||
:description description
|
||||
:sha256 (getf archive-data :sha256)
|
||||
:url url
|
||||
:md5 file-md5
|
||||
:name name
|
||||
:deps deps
|
||||
:dependencies dependencies
|
||||
:version version)))
|
||||
|
||||
(defmacro this-file ()
|
||||
(or *compile-file-truename*
|
||||
*load-truename*))
|
||||
|
||||
(defun nix-expression (system)
|
||||
(cl-emb:execute-emb
|
||||
(merge-pathnames #p"nix-package.emb" (this-file))
|
||||
:env (system-data system)))
|
||||
(defun nix-invocation (system)
|
||||
(cl-emb:execute-emb
|
||||
(merge-pathnames #p"invocation.emb" (this-file))
|
||||
:env (system-data system)))
|
||||
|
||||
(defun systems-closure (systems)
|
||||
(let*
|
||||
((seen (make-hash-table :test 'equal)))
|
||||
(loop
|
||||
with queue := systems
|
||||
with res := nil
|
||||
while queue
|
||||
for next := (pop queue)
|
||||
for deps := (getf (system-data next) :dependencies)
|
||||
unless (gethash next seen) do
|
||||
(progn
|
||||
(push next res)
|
||||
(setf queue (append queue deps)))
|
||||
do (setf (gethash next seen) t)
|
||||
finally (return res))))
|
||||
|
||||
(defun ql-to-nix (target-directory)
|
||||
(let*
|
||||
((systems
|
||||
(cl-ppcre:split
|
||||
(format nil "~%")
|
||||
(alexandria:read-file-into-string
|
||||
(format nil "~a/quicklisp-to-nix-systems.txt" target-directory))))
|
||||
(closure (systems-closure systems))
|
||||
(invocations
|
||||
(loop for s in closure
|
||||
collect (list :code (nix-invocation s)))))
|
||||
(loop
|
||||
for s in closure
|
||||
do (alexandria:write-string-into-file
|
||||
(nix-expression s)
|
||||
(format nil "~a/quicklisp-to-nix-output/~a.nix" target-directory s)
|
||||
:if-exists :supersede))
|
||||
(alexandria:write-string-into-file
|
||||
(cl-emb:execute-emb
|
||||
(merge-pathnames
|
||||
#p"top-package.emb"
|
||||
(this-file))
|
||||
:env (list :invocations invocations))
|
||||
(format nil "~a/quicklisp-to-nix.nix" target-directory)
|
||||
:if-exists :supersede)))
|
@ -0,0 +1,11 @@
|
||||
{stdenv, fetchurl, pkgs, clwrapper}:
|
||||
let quicklisp-to-nix-packages = rec {
|
||||
inherit stdenv fetchurl clwrapper pkgs quicklisp-to-nix-packages;
|
||||
|
||||
callPackage = pkgs.lib.callPackageWith quicklisp-to-nix-packages;
|
||||
buildLispPackage = callPackage ./define-package.nix;
|
||||
qlOverrides = callPackage ./quicklisp-to-nix-overrides.nix {};
|
||||
<% @loop invocations %>
|
||||
<% @var code %>
|
||||
<% @endloop %>
|
||||
}; in quicklisp-to-nix-packages
|
@ -10387,6 +10387,12 @@ with pkgs;
|
||||
lispPackagesSBCL = lispPackagesFor (wrapLisp sbcl);
|
||||
lispPackages = recurseIntoAttrs lispPackagesSBCL;
|
||||
|
||||
quicklispPackagesFor = clwrapper: callPackage ../development/lisp-modules/quicklisp-to-nix.nix {
|
||||
inherit clwrapper;
|
||||
};
|
||||
quicklispPackagesClisp = quicklispPackagesFor (wrapLisp clisp);
|
||||
quicklispPackagesSBCL = quicklispPackagesFor (wrapLisp sbcl);
|
||||
quicklispPackages = quicklispPackagesSBCL;
|
||||
|
||||
### DEVELOPMENT / PERL MODULES
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user