2017-03-31 23:08:02 -07:00
|
|
|
{pkgs, buildLispPackage, clwrapper, quicklisp-to-nix-packages}:
|
2017-03-30 13:54:56 -07:00
|
|
|
let
|
|
|
|
addDeps = newdeps: x: {deps = x.deps ++ newdeps;};
|
|
|
|
addNativeLibs = libs: x: { propagatedBuildInputs = libs; };
|
2017-04-10 00:57:07 -07:00
|
|
|
skipBuildPhase = x: {
|
2017-03-30 13:54:56 -07:00
|
|
|
overrides = y: ((x.overrides y) // { buildPhase = "true"; });
|
2017-03-25 19:15:42 -07:00
|
|
|
};
|
2017-03-30 13:54:56 -07:00
|
|
|
multiOverride = l: x: if l == [] then {} else
|
|
|
|
((builtins.head l) x) // (multiOverride (builtins.tail l) x);
|
|
|
|
in
|
|
|
|
{
|
2017-04-06 09:43:42 -07:00
|
|
|
stumpwm = x:{
|
|
|
|
overrides = y: (x.overrides y) // {
|
|
|
|
preConfigure = ''
|
|
|
|
export configureFlags="$configureFlags --with-$NIX_LISP=common-lisp.sh";
|
|
|
|
'';
|
2017-08-17 17:21:45 -07: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 09:43:42 -07:00
|
|
|
};
|
|
|
|
};
|
2017-03-30 13:54:56 -07:00
|
|
|
iterate = skipBuildPhase;
|
2017-03-25 19:15:42 -07:00
|
|
|
cl-fuse = x: {
|
|
|
|
propagatedBuildInputs = [pkgs.fuse];
|
2017-03-30 13:54:56 -07:00
|
|
|
overrides = y : (x.overrides y) // {
|
2017-03-25 19:15:42 -07:00
|
|
|
configurePhase = ''
|
2017-04-06 09:43:42 -07:00
|
|
|
export SAVED_CL_SOURCE_REGISTRY="$CL_SOURCE_REGISTRY"
|
2017-03-25 19:15:42 -07:00
|
|
|
export CL_SOURCE_REGISTRY="$CL_SOURCE_REGISTRY:$PWD"
|
|
|
|
export makeFlags="$makeFlags LISP=common-lisp.sh"
|
|
|
|
'';
|
2017-04-06 09:43:42 -07:00
|
|
|
preInstall = ''
|
|
|
|
export CL_SOURCE_REGISTRY="$SAVED_CL_SOURCE_REGISTRY"
|
|
|
|
'';
|
2017-03-25 19:15:42 -07:00
|
|
|
};
|
|
|
|
};
|
2017-03-30 13:54:56 -07:00
|
|
|
hunchentoot = addNativeLibs [pkgs.openssl];
|
2017-06-28 13:18:08 -07:00
|
|
|
iolib = x: rec {
|
2017-06-21 13:15:07 -07:00
|
|
|
propagatedBuildInputs = (x.propagatedBuildInputs or [])
|
|
|
|
++ (with pkgs; [libfixposix gcc])
|
|
|
|
;
|
2017-04-09 14:48:02 -07:00
|
|
|
};
|
2017-07-31 19:29:53 -07:00
|
|
|
cxml = skipBuildPhase;
|
|
|
|
wookie = addNativeLibs (with pkgs; [libuv openssl]);
|
2017-03-30 13:54:56 -07:00
|
|
|
lev = addNativeLibs [pkgs.libev];
|
|
|
|
"cl+ssl" = addNativeLibs [pkgs.openssl];
|
|
|
|
cl-colors = skipBuildPhase;
|
|
|
|
cl-libuv = addNativeLibs [pkgs.libuv];
|
2017-07-31 19:29:53 -07:00
|
|
|
cl-async-ssl = addNativeLibs [pkgs.openssl];
|
|
|
|
cl-async-test = addNativeLibs [pkgs.openssl];
|
2017-03-31 03:06:05 -07: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-03-31 23:08:02 -07:00
|
|
|
postInstall = ((x.overrides y).postInstall or "") + ''
|
2017-03-31 03:06:05 -07:00
|
|
|
export CL_SOURCE_REGISTRY="$CL_SOURCE_REGISTRY:$out/lib/common-lisp/query-fs"
|
|
|
|
export HOME=$PWD
|
|
|
|
build-with-lisp.sh sbcl \
|
|
|
|
":query-fs $(echo "$linkedSystems" | sed -re 's/(^| )([^ :])/ :\2/g')" \
|
|
|
|
"$out/bin/query-fs" \
|
|
|
|
"(query-fs:run-fs-with-cmdline-args)"
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
2017-07-31 19:29:53 -07:00
|
|
|
cffi = addNativeLibs [pkgs.libffi];
|
2017-03-31 23:08:02 -07: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-04-06 09:43:42 -07:00
|
|
|
uiop = x: {
|
2017-07-31 19:29:53 -07:00
|
|
|
parasites = (x.parasites or []) ++ [
|
2017-04-16 10:25:36 -07:00
|
|
|
"uiop/version"
|
|
|
|
];
|
2017-04-06 09:43:42 -07: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 13:15:07 -07:00
|
|
|
cl-containers = x: {
|
|
|
|
overrides = y: (x.overrides y) // {
|
|
|
|
postConfigure = "rm GNUmakefile";
|
|
|
|
};
|
|
|
|
};
|
2017-07-31 19:29:53 -07:00
|
|
|
mssql = addNativeLibs [pkgs.freetds];
|
2017-03-25 19:15:42 -07:00
|
|
|
}
|