forked from AndresNavarro82/klisp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
51 lines (36 loc) · 1.13 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
47
48
49
50
51
{ pkgsi686Linux, texinfo }:
pkgsi686Linux.stdenv.mkDerivation rec {
pname = "klisp";
version = "git";
buildInputs = with pkgsi686Linux; [ libffi ];
nativeBuildInputs = [ texinfo ];
src = builtins.path { path = ./.; name = "klisp"; };
NIX_CFLAGS_COMPILE = "-fcommon";
buildPhase = ''
runHook preBuild
pushd src
make clean
make ''${enableParallelBuilding:+-j''${NIX_BUILD_CORES}} posix USE_LIBFFI=1 CC="$CC" AR="$AR rcu" RANLIB="$RANLIB"
popd
pushd doc/src
make clean
make ''${enableParallelBuilding:+-j''${NIX_BUILD_CORES}} info html
popd
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p "$out"/bin/
cp src/klisp "$out"/bin/
mkdir -p "$out"/share/man/man1/
cp doc/klisp.1 "$out"/share/man/man1/
mkdir -p "$out"/share/info/
cp doc/klisp.info "$out"/share/info/
mkdir -p "$out"/share/doc/klisp/
cp -r doc/html/. "$out"/share/doc/klisp/
mkdir -p "$out"/share/klisp/
cp -r src/examples src/tests README COPYRIGHT CHANGES TODO "$out"/share/klisp/
runHook postInstall
'';
enableParallelBuilding = true;
}