2017-04-01 07:08:02 +01:00
|
|
|
{pkgs, buildLispPackage, clwrapper, quicklisp-to-nix-packages}:
|
2017-03-30 21:54:56 +01:00
|
|
|
let
|
|
|
|
addDeps = newdeps: x: {deps = x.deps ++ newdeps;};
|
|
|
|
addNativeLibs = libs: x: { propagatedBuildInputs = libs; };
|
2017-04-10 08:57:07 +01:00
|
|
|
skipBuildPhase = x: {
|
2017-03-30 21:54:56 +01:00
|
|
|
overrides = y: ((x.overrides y) // { buildPhase = "true"; });
|
2017-03-26 03:15:42 +01:00
|
|
|
};
|
2017-03-30 21:54:56 +01:00
|
|
|
multiOverride = l: x: if l == [] then {} else
|
|
|
|
((builtins.head l) x) // (multiOverride (builtins.tail l) x);
|
|
|
|
in
|
|
|
|
{
|
2017-04-06 17:43:42 +01:00
|
|
|
stumpwm = x:{
|
|
|
|
overrides = y: (x.overrides y) // {
|
|
|
|
preConfigure = ''
|
|
|
|
export configureFlags="$configureFlags --with-$NIX_LISP=common-lisp.sh";
|
|
|
|
'';
|
2017-08-18 01:21:45 +01:00
|
|
|
postInstall = ''
|
|
|
|
"$out/bin/stumpwm-lisp-launcher.sh" --eval '(asdf:make :stumpwm)' \
|
|
|
|
--eval '(setf (asdf/system:component-entry-point (asdf:find-system :stumpwm)) (function stumpwm:stumpwm))' \
|
|
|
|
--eval '(asdf:perform (quote asdf:program-op) :stumpwm)'
|
|
|
|
|
|
|
|
cp "$out/lib/common-lisp/stumpwm/stumpwm" "$out/bin"
|
|
|
|
'';
|
2017-04-06 17:43:42 +01:00
|
|
|
};
|
|
|
|
};
|
2017-03-30 21:54:56 +01:00
|
|
|
iterate = skipBuildPhase;
|
2017-03-26 03:15:42 +01:00
|
|
|
cl-fuse = x: {
|
|
|
|
propagatedBuildInputs = [pkgs.fuse];
|
2017-03-30 21:54:56 +01:00
|
|
|
overrides = y : (x.overrides y) // {
|
2017-03-26 03:15:42 +01:00
|
|
|
configurePhase = ''
|
2017-04-06 17:43:42 +01:00
|
|
|
export SAVED_CL_SOURCE_REGISTRY="$CL_SOURCE_REGISTRY"
|
2017-03-26 03:15:42 +01:00
|
|
|
export CL_SOURCE_REGISTRY="$CL_SOURCE_REGISTRY:$PWD"
|
|
|
|
export makeFlags="$makeFlags LISP=common-lisp.sh"
|
|
|
|
'';
|
2017-04-06 17:43:42 +01:00
|
|
|
preInstall = ''
|
|
|
|
export CL_SOURCE_REGISTRY="$SAVED_CL_SOURCE_REGISTRY"
|
|
|
|
'';
|
2017-03-26 03:15:42 +01:00
|
|
|
};
|
|
|
|
};
|
2017-03-30 21:54:56 +01:00
|
|
|
hunchentoot = addNativeLibs [pkgs.openssl];
|
2017-06-28 21:18:08 +01:00
|
|
|
iolib = x: rec {
|
2017-06-21 21:15:07 +01:00
|
|
|
propagatedBuildInputs = (x.propagatedBuildInputs or [])
|
|
|
|
++ (with pkgs; [libfixposix gcc])
|
|
|
|
;
|
2017-04-09 22:48:02 +01:00
|
|
|
};
|
2017-08-01 03:29:53 +01:00
|
|
|
cxml = skipBuildPhase;
|
|
|
|
wookie = addNativeLibs (with pkgs; [libuv openssl]);
|
2017-03-30 21:54:56 +01:00
|
|
|
lev = addNativeLibs [pkgs.libev];
|
|
|
|
"cl+ssl" = addNativeLibs [pkgs.openssl];
|
|
|
|
cl-colors = skipBuildPhase;
|
|
|
|
cl-libuv = addNativeLibs [pkgs.libuv];
|
2017-08-01 03:29:53 +01:00
|
|
|
cl-async-ssl = addNativeLibs [pkgs.openssl];
|
|
|
|
cl-async-test = addNativeLibs [pkgs.openssl];
|
2017-03-31 11:06:05 +01:00
|
|
|
clsql = x: {
|
|
|
|
propagatedBuildInputs = with pkgs; [mysql postgresql sqlite zlib];
|
|
|
|
overrides = y: (x.overrides y) // {
|
|
|
|
preConfigure = ((x.overrides y).preConfigure or "") + ''
|
|
|
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${pkgs.lib.getDev pkgs.mysql.client}/include/mysql"
|
|
|
|
export NIX_LDFLAGS="$NIX_LDFLAGS -L${pkgs.lib.getLib pkgs.mysql.client}/lib/mysql"
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
clx-truetype = skipBuildPhase;
|
|
|
|
query-fs = x: {
|
|
|
|
overrides = y: (x.overrides y) // {
|
|
|
|
linkedSystems = [];
|
2017-04-01 07:08:02 +01:00
|
|
|
postInstall = ((x.overrides y).postInstall or "") + ''
|
2017-03-31 11:06:05 +01:00
|
|
|
export CL_SOURCE_REGISTRY="$CL_SOURCE_REGISTRY:$out/lib/common-lisp/query-fs"
|
|
|
|
export HOME=$PWD
|
2017-09-04 20:38:50 +01:00
|
|
|
"$out/bin/query-fs-lisp-launcher.sh" --eval '(asdf:make :query-fs)' \
|
|
|
|
--eval "(progn $(for i in $linkedSystems; do echo "(asdf:make :$i)"; done) )" \
|
|
|
|
--eval '(setf (asdf/system:component-entry-point (asdf:find-system :query-fs))
|
|
|
|
(function query-fs:run-fs-with-cmdline-args))' \
|
|
|
|
--eval '(asdf:perform (quote asdf:program-op) :query-fs)'
|
|
|
|
cp "$out/lib/common-lisp/query-fs/query-fs" "$out/bin/"
|
2017-03-31 11:06:05 +01:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
2017-08-01 03:29:53 +01:00
|
|
|
cffi = addNativeLibs [pkgs.libffi];
|
2017-04-01 07:08:02 +01:00
|
|
|
cl-mysql = addNativeLibs [pkgs.mysql];
|
|
|
|
cl-ppcre-template = x: {
|
|
|
|
overrides = y: (x.overrides y) // {
|
|
|
|
postPatch = ''
|
|
|
|
ln -s lib-dependent/*.asd .
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
sqlite = addNativeLibs [pkgs.sqlite];
|
2017-08-31 01:22:51 +01: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)))
|
|
|
|
|
|
|
|
-(defvar *fasl-directory* (default-fasl-dir)
|
|
|
|
+(defvar *fasl-directory* #P"$out/lib/common-lisp/swank/fasl/"
|
|
|
|
"The directory where fasl files should be placed.")
|
|
|
|
|
|
|
|
(defun binary-pathname (src-pathname binary-dir)
|
|
|
|
@@ -277,12 +277,7 @@
|
|
|
|
(contrib-dir src-dir))))
|
|
|
|
|
|
|
|
(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)))
|
|
|
|
|
|
|
|
(defun compile-contribs (&key (src-dir (contrib-dir *source-directory*))
|
|
|
|
(fasl-dir (contrib-dir *fasl-directory*))
|
|
|
|
EOD
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
2017-04-06 17:43:42 +01:00
|
|
|
uiop = x: {
|
2017-08-01 03:29:53 +01:00
|
|
|
parasites = (x.parasites or []) ++ [
|
2017-04-16 18:25:36 +01:00
|
|
|
"uiop/version"
|
|
|
|
];
|
2017-04-06 17:43:42 +01:00
|
|
|
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 21:15:07 +01:00
|
|
|
cl-containers = x: {
|
|
|
|
overrides = y: (x.overrides y) // {
|
|
|
|
postConfigure = "rm GNUmakefile";
|
|
|
|
};
|
|
|
|
};
|
2017-08-01 03:29:53 +01:00
|
|
|
mssql = addNativeLibs [pkgs.freetds];
|
2017-08-31 01:22:51 +01:00
|
|
|
cl-unification = x: {
|
|
|
|
asdFilesToKeep = (x.asdFilesToKeep or []) ++ [
|
|
|
|
"cl-unification-lib.asd"
|
|
|
|
];
|
|
|
|
};
|
2017-03-26 03:15:42 +01:00
|
|
|
}
|