2018-07-21 00:44:44 +00:00
|
|
|
{pkgs, quicklisp-to-nix-packages}:
|
2017-03-30 20:54:56 +00:00
|
|
|
let
|
|
|
|
addNativeLibs = libs: x: { propagatedBuildInputs = libs; };
|
2017-04-10 07:57:07 +00:00
|
|
|
skipBuildPhase = x: {
|
2017-03-30 20:54:56 +00:00
|
|
|
overrides = y: ((x.overrides y) // { buildPhase = "true"; });
|
2017-03-26 02:15:42 +00:00
|
|
|
};
|
2017-03-30 20:54:56 +00:00
|
|
|
multiOverride = l: x: if l == [] then {} else
|
|
|
|
((builtins.head l) x) // (multiOverride (builtins.tail l) x);
|
|
|
|
in
|
|
|
|
{
|
2017-04-06 16:43:42 +00:00
|
|
|
stumpwm = x:{
|
|
|
|
overrides = y: (x.overrides y) // {
|
2019-03-25 12:28:52 +00:00
|
|
|
linkedSystems = [];
|
2017-04-06 16:43:42 +00:00
|
|
|
preConfigure = ''
|
|
|
|
export configureFlags="$configureFlags --with-$NIX_LISP=common-lisp.sh";
|
|
|
|
'';
|
2017-08-18 00:21:45 +00:00
|
|
|
postInstall = ''
|
2019-03-25 12:28:52 +00:00
|
|
|
export NIX_LISP_PRELAUNCH_HOOK="nix_lisp_build_system stumpwm \
|
|
|
|
'(function stumpwm:stumpwm)' '$linkedSystems'"
|
2018-01-29 14:15:00 +00:00
|
|
|
"$out/bin/stumpwm-lisp-launcher.sh"
|
2017-08-18 00:21:45 +00:00
|
|
|
|
|
|
|
cp "$out/lib/common-lisp/stumpwm/stumpwm" "$out/bin"
|
|
|
|
'';
|
2017-04-06 16:43:42 +00:00
|
|
|
};
|
|
|
|
};
|
2017-03-30 20:54:56 +00:00
|
|
|
iterate = skipBuildPhase;
|
2017-03-26 02:15:42 +00:00
|
|
|
cl-fuse = x: {
|
|
|
|
propagatedBuildInputs = [pkgs.fuse];
|
2017-03-30 20:54:56 +00:00
|
|
|
overrides = y : (x.overrides y) // {
|
2017-03-26 02:15:42 +00:00
|
|
|
configurePhase = ''
|
|
|
|
export makeFlags="$makeFlags LISP=common-lisp.sh"
|
|
|
|
'';
|
2017-12-19 15:43:18 +00:00
|
|
|
preInstall = ''
|
|
|
|
type gcc
|
2020-10-24 11:25:53 +00:00
|
|
|
mkdir -p "$out/lib/common-lisp/"
|
2017-12-19 15:43:18 +00:00
|
|
|
cp -r . "$out/lib/common-lisp/cl-fuse/"
|
2020-10-24 11:25:53 +00:00
|
|
|
"gcc" "-x" "c" "$out/lib/common-lisp/cl-fuse/fuse-launcher.c-minus" "-fPIC" "--shared" "-lfuse" "-o" "$out/lib/common-lisp/cl-fuse/libfuse-launcher.so"
|
2017-12-19 15:43:18 +00:00
|
|
|
'';
|
2017-03-26 02:15:42 +00:00
|
|
|
};
|
|
|
|
};
|
2017-03-30 20:54:56 +00:00
|
|
|
hunchentoot = addNativeLibs [pkgs.openssl];
|
2019-08-13 21:52:01 +00:00
|
|
|
iolib = x: {
|
2017-06-21 20:15:07 +00:00
|
|
|
propagatedBuildInputs = (x.propagatedBuildInputs or [])
|
|
|
|
++ (with pkgs; [libfixposix gcc])
|
|
|
|
;
|
2019-09-10 19:40:15 +00:00
|
|
|
overrides = y: (x.overrides y) // {
|
|
|
|
prePatch = ''
|
|
|
|
sed 's|default \"libfixposix\"|default \"${pkgs.libfixposix}/lib/libfixposix\"|' -i src/syscalls/ffi-functions-unix.lisp
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2017-04-09 21:48:02 +00:00
|
|
|
};
|
2017-08-01 02:29:53 +00:00
|
|
|
cxml = skipBuildPhase;
|
|
|
|
wookie = addNativeLibs (with pkgs; [libuv openssl]);
|
2017-03-30 20:54:56 +00:00
|
|
|
lev = addNativeLibs [pkgs.libev];
|
2019-09-10 19:47:20 +00:00
|
|
|
cl_plus_ssl = x: rec {
|
|
|
|
propagatedBuildInputs = [pkgs.openssl];
|
|
|
|
overrides = y: (x.overrides y) // {
|
|
|
|
prePatch = ''
|
|
|
|
sed 's|libssl.so|${pkgs.openssl.out}/lib/libssl.so|' -i src/reload.lisp
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
2017-03-30 20:54:56 +00:00
|
|
|
cl-colors = skipBuildPhase;
|
|
|
|
cl-libuv = addNativeLibs [pkgs.libuv];
|
2018-09-12 08:47:19 +00:00
|
|
|
cl-async-ssl = addNativeLibs [pkgs.openssl (import ./openssl-lib-marked.nix)];
|
2017-08-01 02:29:53 +00:00
|
|
|
cl-async-test = addNativeLibs [pkgs.openssl];
|
2017-03-31 10:06:05 +00:00
|
|
|
clsql = x: {
|
2019-09-22 07:38:09 +00:00
|
|
|
propagatedBuildInputs = with pkgs; [libmysqlclient postgresql sqlite zlib];
|
2017-03-31 10:06:05 +00:00
|
|
|
overrides = y: (x.overrides y) // {
|
|
|
|
preConfigure = ((x.overrides y).preConfigure or "") + ''
|
2019-09-22 07:38:09 +00:00
|
|
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${pkgs.libmysqlclient}/include/mysql"
|
|
|
|
export NIX_LDFLAGS="$NIX_LDFLAGS -L${pkgs.libmysqlclient}/lib/mysql"
|
2017-03-31 10:06:05 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
clx-truetype = skipBuildPhase;
|
|
|
|
query-fs = x: {
|
|
|
|
overrides = y: (x.overrides y) // {
|
|
|
|
linkedSystems = [];
|
2017-04-01 06:08:02 +00:00
|
|
|
postInstall = ((x.overrides y).postInstall or "") + ''
|
2017-11-22 06:55:06 +00:00
|
|
|
export NIX_LISP_ASDF_PATHS="$NIX_LISP_ASDF_PATHS
|
|
|
|
$out/lib/common-lisp/query-fs"
|
2017-03-31 10:06:05 +00:00
|
|
|
export HOME=$PWD
|
2018-01-29 14:15:00 +00:00
|
|
|
export NIX_LISP_PRELAUNCH_HOOK="nix_lisp_build_system query-fs \
|
|
|
|
'(function query-fs:run-fs-with-cmdline-args)' '$linkedSystems'"
|
|
|
|
"$out/bin/query-fs-lisp-launcher.sh"
|
|
|
|
cp "$out/lib/common-lisp/query-fs/query-fs" "$out/bin/"
|
2017-03-31 10:06:05 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
2017-08-01 02:29:53 +00:00
|
|
|
cffi = addNativeLibs [pkgs.libffi];
|
2019-10-05 20:57:11 +00:00
|
|
|
cl-mysql = x: {
|
|
|
|
propagatedBuildInputs = [pkgs.libmysqlclient];
|
|
|
|
overrides = y: (x.overrides y) // {
|
|
|
|
prePatch = ((x.overrides y).prePatch or "") + ''
|
|
|
|
sed -i 's,libmysqlclient_r,${pkgs.libmysqlclient}/lib/mysql/libmysqlclient_r,' system.lisp
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
2017-04-01 06:08:02 +00:00
|
|
|
cl-ppcre-template = x: {
|
|
|
|
overrides = y: (x.overrides y) // {
|
|
|
|
postPatch = ''
|
|
|
|
ln -s lib-dependent/*.asd .
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
2020-01-21 02:21:51 +00:00
|
|
|
serapeum = x: {
|
|
|
|
overrides = y: (x.overrides y) //{
|
|
|
|
# Override src until quicklisp catches up to 65837f8 (see serapeum
|
|
|
|
# issue #42)
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "ruricolist";
|
|
|
|
repo = "serapeum";
|
|
|
|
rev = "65837f8a0d65b36369ec8d000fff5c29a395b5fe";
|
|
|
|
sha256 = "0clwf81r2lvk1rbfvk91s9zmbkas9imf57ilqclw12mxaxlfsnbw";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2019-09-10 19:47:20 +00:00
|
|
|
sqlite = x: {
|
|
|
|
propagatedBuildInputs = [pkgs.sqlite];
|
|
|
|
overrides = y: (x.overrides y) // {
|
|
|
|
prePatch = ((x.overrides y).preConfigure or "") + ''
|
|
|
|
sed 's|libsqlite3|${pkgs.sqlite.out}/lib/libsqlite3|' -i sqlite-ffi.lisp
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
2017-08-31 00:22:51 +00:00
|
|
|
swank = x: {
|
|
|
|
overrides = y: (x.overrides y) // {
|
|
|
|
postPatch = ''
|
|
|
|
patch <<EOD
|
|
|
|
--- swank-loader.lisp 2017-08-30 16:46:16.554076684 -0700
|
|
|
|
+++ swank-loader-new.lisp 2017-08-30 16:49:23.333450928 -0700
|
|
|
|
@@ -155,7 +155,7 @@
|
|
|
|
,(unique-dir-name)))
|
|
|
|
(user-homedir-pathname)))
|
2020-10-24 11:25:53 +00:00
|
|
|
|
2017-08-31 00:22:51 +00:00
|
|
|
-(defvar *fasl-directory* (default-fasl-dir)
|
|
|
|
+(defvar *fasl-directory* #P"$out/lib/common-lisp/swank/fasl/"
|
|
|
|
"The directory where fasl files should be placed.")
|
2020-10-24 11:25:53 +00:00
|
|
|
|
2017-08-31 00:22:51 +00:00
|
|
|
(defun binary-pathname (src-pathname binary-dir)
|
|
|
|
@@ -277,12 +277,7 @@
|
|
|
|
(contrib-dir src-dir))))
|
2020-10-24 11:25:53 +00:00
|
|
|
|
2017-08-31 00:22:51 +00:00
|
|
|
(defun delete-stale-contrib-fasl-files (swank-files contrib-files fasl-dir)
|
|
|
|
- (let ((newest (reduce #'max (mapcar #'file-write-date swank-files))))
|
|
|
|
- (dolist (src contrib-files)
|
|
|
|
- (let ((fasl (binary-pathname src fasl-dir)))
|
|
|
|
- (when (and (probe-file fasl)
|
|
|
|
- (<= (file-write-date fasl) newest))
|
|
|
|
- (delete-file fasl))))))
|
|
|
|
+ (declare (ignore swank-files contrib-files fasl-dir)))
|
2020-10-24 11:25:53 +00:00
|
|
|
|
2017-08-31 00:22:51 +00:00
|
|
|
(defun compile-contribs (&key (src-dir (contrib-dir *source-directory*))
|
|
|
|
(fasl-dir (contrib-dir *fasl-directory*))
|
|
|
|
EOD
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
2017-04-06 16:43:42 +00:00
|
|
|
uiop = x: {
|
|
|
|
overrides = y: (x.overrides y) // {
|
|
|
|
postInstall = ((x.overrides y).postInstall or "") + ''
|
|
|
|
cp -r "${pkgs.asdf}/lib/common-lisp/asdf/uiop/contrib" "$out/lib/common-lisp/uiop"
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
2017-06-21 20:15:07 +00:00
|
|
|
cl-containers = x: {
|
|
|
|
overrides = y: (x.overrides y) // {
|
|
|
|
postConfigure = "rm GNUmakefile";
|
|
|
|
};
|
|
|
|
};
|
2017-08-01 02:29:53 +00:00
|
|
|
mssql = addNativeLibs [pkgs.freetds];
|
2017-08-31 00:22:51 +00:00
|
|
|
cl-unification = x: {
|
|
|
|
asdFilesToKeep = (x.asdFilesToKeep or []) ++ [
|
|
|
|
"cl-unification-lib.asd"
|
|
|
|
];
|
|
|
|
};
|
2018-02-12 19:38:21 +00:00
|
|
|
simple-date = x: {
|
|
|
|
deps = with quicklisp-to-nix-packages; [
|
|
|
|
fiveam md5 usocket
|
|
|
|
];
|
|
|
|
parasites = [
|
2018-09-12 08:47:19 +00:00
|
|
|
# Needs pomo? Wants to do queries unconditionally?
|
|
|
|
# "simple-date/tests"
|
2018-02-12 19:38:21 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
cl-postgres = x: {
|
|
|
|
deps = pkgs.lib.filter (x: x.outPath != quicklisp-to-nix-packages.simple-date.outPath) x.deps;
|
|
|
|
parasites = (x.parasites or []) ++ [
|
|
|
|
"simple-date" "simple-date/postgres-glue"
|
|
|
|
];
|
|
|
|
asdFilesToKeep = x.asdFilesToKeep ++ ["simple-date.asd"];
|
|
|
|
};
|
2018-02-25 17:07:28 +00:00
|
|
|
buildnode = x: {
|
|
|
|
deps = pkgs.lib.filter (x: x.name != quicklisp-to-nix-packages.buildnode-xhtml.name) x.deps;
|
|
|
|
parasites = pkgs.lib.filter (x: x!= "buildnode-test") x.parasites;
|
|
|
|
};
|
2018-04-10 23:02:55 +00:00
|
|
|
postmodern = x: {
|
|
|
|
overrides = y : (x.overrides y) // {
|
|
|
|
meta.broken = true; # 2018-04-10
|
|
|
|
};
|
|
|
|
};
|
2019-08-25 19:53:20 +00:00
|
|
|
split-sequence = x: {
|
|
|
|
overrides = y: (x.overrides y) // {
|
|
|
|
preConfigure = ''
|
|
|
|
sed -i -e '/:components/i:serial t' split-sequence.asd
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
2020-02-04 16:21:55 +00:00
|
|
|
cl-store = x: {
|
|
|
|
overrides = y: (x.overrides y) // {
|
|
|
|
postPatch = ''
|
|
|
|
sed -i -e 's/:initform "Unknown" /:initform #:|Unknown| /' backends.lisp
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
2020-10-24 11:25:53 +00:00
|
|
|
dbi = x: {
|
|
|
|
parasites = [];
|
|
|
|
deps = pkgs.lib.filter
|
|
|
|
(x:
|
|
|
|
(
|
|
|
|
x.name != quicklisp-to-nix-packages.dbd-mysql.name &&
|
|
|
|
x.name != quicklisp-to-nix-packages.dbd-postgres.name &&
|
|
|
|
x.name != quicklisp-to-nix-packages.dbd-sqlite3.name &&
|
|
|
|
x.name != quicklisp-to-nix-packages.dbi-test.name &&
|
|
|
|
true))
|
|
|
|
x.deps;
|
|
|
|
};
|
2020-10-24 18:14:01 +00:00
|
|
|
cl-cffi-gtk-glib = addNativeLibs [pkgs.glib];
|
|
|
|
cl-cffi-gtk-gdk-pixbuf = addNativeLibs [pkgs.gdk_pixbuf];
|
|
|
|
cl-cffi-gtk-cairo = addNativeLibs [pkgs.cairo];
|
|
|
|
cl-cffi-gtk-pango = addNativeLibs [pkgs.pango];
|
|
|
|
cl-cffi-gtk-gdk = addNativeLibs [pkgs.gtk3];
|
|
|
|
cl-cffi-gtk-gtk3 = addNativeLibs [pkgs.gtk3];
|
2017-03-26 02:15:42 +00:00
|
|
|
}
|