tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
Merge #10104: picolisp, ccl and sbcl improvements
Vladimír Čunát
10 years ago
00935b25
d5c92d50
+110
-58
6 changed files
expand all
collapse all
unified
split
pkgs
development
compilers
ccl
default.nix
sbcl
bootstrap.nix
default.nix
interpreters
picolisp
default.nix
lisp-modules
lisp-packages.nix
top-level
all-packages.nix
+35
-10
pkgs/development/compilers/ccl/default.nix
···
1
1
{ stdenv, fetchsvn, gcc, glibc, m4, coreutils }:
2
2
3
3
-
/* TODO: there are also MacOS, FreeBSD and Windows versions */
4
4
-
assert stdenv.system == "x86_64-linux" || stdenv.system == "i686-linux";
3
3
+
let
4
4
+
options = rec {
5
5
+
/* TODO: there are also MacOS, FreeBSD and Windows versions */
6
6
+
x86_64-linux = {
7
7
+
arch = "linuxx86";
8
8
+
sha256 = "04p77n18cw0bc8i66mp2vfrhlliahrx66lm004a3nw3h0mdk0gd8";
9
9
+
runtime = "lx86cl64";
10
10
+
kernel = "linuxx8664";
11
11
+
};
12
12
+
i686-linux = {
13
13
+
arch = "linuxx86";
14
14
+
sha256 = x86_64-linux.sha256;
15
15
+
runtime = "lx86cl";
16
16
+
kernel = "linuxx8632";
17
17
+
};
18
18
+
armv7l-linux = {
19
19
+
arch = "linuxarm";
20
20
+
sha256 = "0xg9p1q1fpgyfhwjk2hh24vqzddzx5zqff04lycf0vml5qw1gnkv";
21
21
+
runtime = "armcl";
22
22
+
kernel = "linuxarm";
23
23
+
};
24
24
+
armv6l-linux = armv7l-linux;
25
25
+
};
26
26
+
cfg = options.${stdenv.system};
27
27
+
in
28
28
+
29
29
+
assert builtins.hasAttr stdenv.system options;
5
30
6
31
stdenv.mkDerivation rec {
7
32
name = "ccl-${version}";
···
9
34
revision = "16313";
10
35
11
36
src = fetchsvn {
12
12
-
url = http://svn.clozure.com/publicsvn/openmcl/release/1.10/linuxx86/ccl;
37
37
+
url = "http://svn.clozure.com/publicsvn/openmcl/release/${version}/${cfg.arch}/ccl";
13
38
rev = revision;
14
14
-
sha256 = "04p77n18cw0bc8i66mp2vfrhlliahrx66lm004a3nw3h0mdk0gd8";
39
39
+
sha256 = cfg.sha256;
15
40
};
16
41
17
42
buildInputs = [ gcc glibc m4 ];
18
43
19
19
-
CCL_RUNTIME = if stdenv.system == "x86_64-linux" then "lx86cl64" else "lx86cl";
20
20
-
CCL_KERNEL = if stdenv.system == "x86_64-linux" then "linuxx8664" else "linuxx8632";
44
44
+
CCL_RUNTIME = cfg.runtime;
45
45
+
CCL_KERNEL = cfg.kernel;
21
46
22
47
patchPhase = ''
23
48
substituteInPlace lisp-kernel/${CCL_KERNEL}/Makefile \
···
45
70
chmod a+x "$out"/bin/"${CCL_RUNTIME}"
46
71
'';
47
72
48
48
-
meta = {
73
73
+
meta = with stdenv.lib; {
49
74
description = "Clozure Common Lisp";
50
75
homepage = http://ccl.clozure.com/;
51
51
-
maintainers = with stdenv.lib.maintainers; [ raskin muflax ];
52
52
-
platforms = stdenv.lib.platforms.linux;
53
53
-
license = stdenv.lib.licenses.lgpl21;
76
76
+
maintainers = with maintainers; [ raskin muflax ];
77
77
+
platforms = attrNames options;
78
78
+
license = licenses.lgpl21;
54
79
};
55
80
}
+46
-17
pkgs/development/compilers/sbcl/bootstrap.nix
···
1
1
-
{ stdenv, fetchurl }:
1
1
+
{ stdenv, fetchurl, makeWrapper }:
2
2
3
3
+
let
4
4
+
options = rec {
5
5
+
x86_64-darwin = rec {
6
6
+
version = "1.1.8";
7
7
+
system = "x86-64-darwin";
8
8
+
sha256 = "006pr88053wclvbjfjdypnbiw8wymbzdzi7a6kbkpdfn4zf5943j";
9
9
+
};
10
10
+
x86_64-linux = rec {
11
11
+
version = "1.2.15";
12
12
+
system = "x86-64-linux";
13
13
+
sha256 = "1bpbfz9x2w73hy2kh8p0kd4m1p6pin90h2zycq52r3bbz8yv47aw";
14
14
+
};
15
15
+
i686-linux = rec {
16
16
+
version = "1.2.7";
17
17
+
system = "x86-linux";
18
18
+
sha256 = "07f3bz4br280qvn85i088vpzj9wcz8wmwrf665ypqx181pz2ai3j";
19
19
+
};
20
20
+
armv7l-linux = rec {
21
21
+
version = "1.2.14";
22
22
+
system = "armhf-linux";
23
23
+
sha256 = "0sp5445rbvms6qvzhld0kwwvydw51vq5iaf4kdqsf2d9jvaz3yx5";
24
24
+
};
25
25
+
armv6l-linux = armv7l-linux;
26
26
+
};
27
27
+
cfg = options.${stdenv.system};
28
28
+
in
3
29
stdenv.mkDerivation rec {
4
30
name = "sbcl-bootstrap-${version}";
5
5
-
version = "1.1.8";
31
31
+
version = cfg.version;
32
32
+
33
33
+
src = fetchurl {
34
34
+
url = "mirror://sourceforge/project/sbcl/sbcl/${version}/sbcl-${version}-${cfg.system}-binary.tar.bz2";
35
35
+
sha256 = cfg.sha256;
36
36
+
};
6
37
7
7
-
src = if stdenv.isDarwin
8
8
-
then fetchurl {
9
9
-
url = mirror://sourceforge/project/sbcl/sbcl/1.1.8/sbcl-1.1.8-x86-64-darwin-binary.tar.bz2;
10
10
-
sha256 = "006pr88053wclvbjfjdypnbiw8wymbzdzi7a6kbkpdfn4zf5943j";
11
11
-
}
12
12
-
else fetchurl {
13
13
-
url = mirror://sourceforge/project/sbcl/sbcl/1.1.8/sbcl-1.1.8-x86-64-linux-binary.tar.bz2;
14
14
-
sha256 = "0lh1jglxlfwk4cm6sgwk1jnb6ikhbrkx7p5aha2nbmkd6zl96prx";
15
15
-
};
38
38
+
buildInputs = [ makeWrapper ];
16
39
17
40
installPhase = ''
18
18
-
mkdir -p $out/bin
19
19
-
cp -p src/runtime/sbcl $out/bin
20
41
mkdir -p $out/share/sbcl
42
42
+
cp -p src/runtime/sbcl $out/share/sbcl
21
43
cp -p output/sbcl.core $out/share/sbcl
44
44
+
mkdir -p $out/bin
45
45
+
makeWrapper $out/share/sbcl/sbcl $out/bin/sbcl \
46
46
+
--add-flags "--core $out/share/sbcl/sbcl.core"
22
47
'';
23
48
24
24
-
meta = {
49
49
+
postFixup = stdenv.lib.optionalString (!stdenv.isArm) ''
50
50
+
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $out/share/sbcl/sbcl
51
51
+
'';
52
52
+
53
53
+
meta = with stdenv.lib; {
25
54
description = "Lisp compiler";
26
55
homepage = "http://www.sbcl.org";
27
27
-
license = "bsd";
28
28
-
maintainers = [stdenv.lib.maintainers.raskin];
29
29
-
platforms = stdenv.lib.platforms.unix;
56
56
+
license = licenses.publicDomain; # and FreeBSD
57
57
+
maintainers = [maintainers.raskin];
58
58
+
platforms = attrNames options;
30
59
};
31
60
}
+12
-21
pkgs/development/compilers/sbcl/default.nix
···
1
1
-
{ stdenv, fetchurl, sbclBootstrap, clisp, which}:
1
1
+
{ stdenv, fetchurl, sbclBootstrap, sbclBootstrapHost ? "${sbclBootstrap}/bin/sbcl --disable-debugger --no-userinit --no-sysinit", which }:
2
2
3
3
stdenv.mkDerivation rec {
4
4
name = "sbcl-${version}";
5
5
-
version = "1.2.14";
5
5
+
version = "1.2.15";
6
6
7
7
src = fetchurl {
8
8
url = "mirror://sourceforge/project/sbcl/sbcl/${version}/${name}-source.tar.bz2";
9
9
-
sha256 = "01jw1w5siv6q16y1vmgd7s1i22aq0cqaipgn12jvq18c8vb6s55r";
9
9
+
sha256 = "0l8nrf5qnr8c9hr6bn1kd86mnr2s37b493azh9rrk3v59f56wnnr";
10
10
};
11
11
12
12
-
buildInputs = [ which ]
13
13
-
++ (stdenv.lib.optional stdenv.isDarwin sbclBootstrap)
14
14
-
++ (stdenv.lib.optional stdenv.isLinux clisp)
15
15
-
;
12
12
+
buildInputs = [ which ];
16
13
17
14
patchPhase = ''
18
15
echo '"${version}.nixos"' > version.lisp-expr
···
22
19
(pushnew x features))
23
20
(disable (x)
24
21
(setf features (remove x features))))
25
25
-
(enable :sb-thread))) " > customize-target-features.lisp
22
22
+
#-arm
23
23
+
(enable :sb-thread)
24
24
+
#+arm
25
25
+
(enable :arm))) " > customize-target-features.lisp
26
26
27
27
pwd
28
28
···
64
64
export HOME=$PWD/test-home
65
65
'';
66
66
67
67
-
buildPhase = if stdenv.isLinux
68
68
-
then ''
69
69
-
sh make.sh clisp --prefix=$out
70
70
-
''
71
71
-
else ''
72
72
-
sh make.sh --prefix=$out --xc-host='${sbclBootstrap}/bin/sbcl --core ${sbclBootstrap}/share/sbcl/sbcl.core --disable-debugger --no-userinit --no-sysinit'
73
73
-
'';
67
67
+
buildPhase = ''
68
68
+
sh make.sh --prefix=$out --xc-host="${sbclBootstrapHost}"
69
69
+
'';
74
70
75
71
installPhase = ''
76
72
INSTALL_ROOT=$out sh install.sh
77
73
'';
78
74
79
79
-
meta = {
80
80
-
description = "Lisp compiler";
81
81
-
homepage = http://www.sbcl.org;
82
82
-
license = stdenv.lib.licenses.bsd3;
83
83
-
maintainers = [stdenv.lib.maintainers.raskin];
84
84
-
platforms = stdenv.lib.platforms.all;
75
75
+
meta = sbclBootstrap.meta // {
85
76
inherit version;
86
77
updateWalker = true;
87
78
};
+12
-3
pkgs/development/interpreters/picolisp/default.nix
···
3
3
4
4
stdenv.mkDerivation rec {
5
5
name = "picoLisp-${version}";
6
6
-
version = "3.1.10";
6
6
+
version = "3.1.11";
7
7
src = fetchurl {
8
8
url = "http://www.software-lab.de/${name}.tgz";
9
9
-
sha256 = "1pn5c0d81rz1fazsdijhw4cqybaad2wn6qramdj2qqkzxa3vvll1";
9
9
+
sha256 = "01kgyz0lkz36lxvibv07qd06gwdxvvbain9f9cnya7a12kq3009i";
10
10
};
11
11
-
buildInputs = [ jdk ];
11
11
+
buildInputs = optional stdenv.is64bit jdk;
12
12
+
patchPhase = optionalString stdenv.isArm ''
13
13
+
sed -i s/-m32//g Makefile
14
14
+
cat >>Makefile <<EOF
15
15
+
ext.o: ext.c
16
16
+
\$(CC) \$(CFLAGS) -fPIC -D_OS='"\$(OS)"' \$*.c
17
17
+
ht.o: ht.c
18
18
+
\$(CC) \$(CFLAGS) -fPIC -D_OS='"\$(OS)"' \$*.c
19
19
+
EOF
20
20
+
'';
12
21
sourceRoot = ''picoLisp/src${optionalString stdenv.is64bit "64"}'';
13
22
installPhase = ''
14
23
cd ..
+4
-4
pkgs/development/lisp-modules/lisp-packages.nix
···
196
196
# Source type: git
197
197
src = pkgs.fetchgit {
198
198
url =
199
199
-
#''http://git.b9.com/clsql.git''
199
199
+
#''http://git.kpe.io/clsql.git''
200
200
"http://repo.or.cz/r/clsql.git"
201
201
;
202
202
sha256 = "1wzc7qsnq8hk0j0h9jmj4xczmh7h6njafwab2zylh8wxmfzwp2nw";
···
217
217
deps = [];
218
218
# Source type: git
219
219
src = pkgs.fetchgit {
220
220
-
url = ''http://git.b9.com/uffi.git'';
220
220
+
url = ''http://git.kpe.io/uffi.git'';
221
221
sha256 = "219e4cfebfac251c922bcb9d517980b0988d765bd18b7f5cc765a43913aaacc6";
222
222
rev = ''a63da5b764b6fa30e32fcda4ddac88de385c9d5b'';
223
223
};
···
467
467
deps = [];
468
468
# Source type: git
469
469
src = pkgs.fetchgit {
470
470
-
url = ''http://git.b9.com/cl-base64.git'';
470
470
+
url = ''http://git.kpe.io/cl-base64.git'';
471
471
sha256 = "a34196544cc67d54aef74e31eff2cee62a7861a5675d010fcd925f1c61c23e81";
472
472
rev = ''f375d1fc3a6616e95ae88bb33493bb99f920ba13'';
473
473
};
···
480
480
deps = [];
481
481
# Source type: git
482
482
src = pkgs.fetchgit {
483
483
-
url = ''http://git.b9.com/puri.git'';
483
483
+
url = ''http://git.kpe.io/puri.git'';
484
484
sha256 = "71804698e7f3009fb7f570656af5d952465bfe77f72e9c41f7e2dda8a5b45c5e";
485
485
rev = ''68260dbf320c01089c8cee54ef32c800eefcde7f'';
486
486
};
+1
-3
pkgs/top-level/all-packages.nix
···
4701
4701
rustfmt = callPackage ../development/tools/rust/rustfmt { };
4702
4702
4703
4703
sbclBootstrap = callPackage ../development/compilers/sbcl/bootstrap.nix {};
4704
4704
-
sbcl = callPackage ../development/compilers/sbcl {
4705
4705
-
clisp = clisp;
4706
4706
-
};
4704
4704
+
sbcl = callPackage ../development/compilers/sbcl {};
4707
4705
# For StumpWM
4708
4706
sbcl_1_2_5 = callPackage ../development/compilers/sbcl/1.2.5.nix {
4709
4707
clisp = clisp;