-
Notifications
You must be signed in to change notification settings - Fork 1
/
default.nix
46 lines (40 loc) · 1.31 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
with (import <nixpkgs> {});
stdenv.mkDerivation rec {
pname = "cycle";
version = "v0.3.0";
sbclCore = sbcl.overrideAttrs (oldAttrs: rec {
enableFeatures = oldAttrs.enableFeatures ++ ["sb-core-compression"];
buildInputs = oldAttrs.buildInputs ++ [zlib];
sbclBootstrapHost = "${sbclBootstrap}/bin/sbcl --disable-debugger --no-userinit --no-sysinit";
buildPhase = ''
runHook preBuild
sh make.sh --prefix=$out --xc-host="${sbclBootstrapHost}" ${if stdenv.hostPlatform.system == "aarch64-darwin" then "--arch=arm64" else ""} "--with-sb-core-compression"
runHook postBuild
'';
});
src = fetchFromGitHub {
owner = "asimpson";
repo = pname;
rev = version;
hash = "sha256-AEGceS5hX8VrBYHeViCaR++DI2kBeR2IWcD9TH2Ea5U=";
};
buildInputs = [
curl
sbclCore
];
preBuild = ''
export HOME=$out
mkdir -p $out/ql
mkdir -p $out/bin
curl -kL -o $out/ql/quicklisp.lisp "https://beta.quicklisp.org/quicklisp.lisp"
sbcl --load $out/ql/quicklisp.lisp \
--eval "(quicklisp-quickstart:install :path \"$out/ql/quicklisp\")" \
--eval "(quit)" && \
sbcl --load $out/ql/quicklisp/setup.lisp \
--eval "(ql::without-prompting (ql:add-to-init-file))" \
--eval "(quit)"
'';
installPhase = ''
mv cycle $out/bin
'';
}