lisps: some refactoring
This commit is contained in:
parent
4e66ba1a70
commit
673f3de193
@ -1,11 +1,8 @@
|
|||||||
{ stdenv, fetchsvn, gcc, glibc, m4, coreutils }:
|
{ stdenv, fetchsvn, gcc, glibc, m4, coreutils }:
|
||||||
|
|
||||||
/* TODO: there are also MacOS, FreeBSD and Windows versions */
|
|
||||||
assert stdenv.system == "x86_64-linux" || stdenv.system == "i686-linux"
|
|
||||||
|| stdenv.system == "armv7l-linux" || stdenv.system == "armv6l-linux";
|
|
||||||
|
|
||||||
let
|
let
|
||||||
options = rec {
|
options = rec {
|
||||||
|
/* TODO: there are also MacOS, FreeBSD and Windows versions */
|
||||||
x86_64-linux = {
|
x86_64-linux = {
|
||||||
arch = "linuxx86";
|
arch = "linuxx86";
|
||||||
sha256 = "04p77n18cw0bc8i66mp2vfrhlliahrx66lm004a3nw3h0mdk0gd8";
|
sha256 = "04p77n18cw0bc8i66mp2vfrhlliahrx66lm004a3nw3h0mdk0gd8";
|
||||||
@ -28,6 +25,9 @@ let
|
|||||||
};
|
};
|
||||||
cfg = options.${stdenv.system};
|
cfg = options.${stdenv.system};
|
||||||
in
|
in
|
||||||
|
|
||||||
|
assert builtins.hasAttr stdenv.system options;
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "ccl-${version}";
|
name = "ccl-${version}";
|
||||||
version = "1.10";
|
version = "1.10";
|
||||||
@ -70,11 +70,11 @@ stdenv.mkDerivation rec {
|
|||||||
chmod a+x "$out"/bin/"${CCL_RUNTIME}"
|
chmod a+x "$out"/bin/"${CCL_RUNTIME}"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = with stdenv.lib; {
|
||||||
description = "Clozure Common Lisp";
|
description = "Clozure Common Lisp";
|
||||||
homepage = http://ccl.clozure.com/;
|
homepage = http://ccl.clozure.com/;
|
||||||
maintainers = with stdenv.lib.maintainers; [ raskin muflax ];
|
maintainers = with maintainers; [ raskin muflax ];
|
||||||
platforms = stdenv.lib.platforms.linux;
|
platforms = attrNames options;
|
||||||
license = stdenv.lib.licenses.lgpl21;
|
license = licenses.lgpl21;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -46,15 +46,15 @@ stdenv.mkDerivation rec {
|
|||||||
--add-flags "--core $out/share/sbcl/sbcl.core"
|
--add-flags "--core $out/share/sbcl/sbcl.core"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postFixup = if stdenv.isArm then "" else ''
|
postFixup = stdenv.lib.optionalString (!stdenv.isArm) ''
|
||||||
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $out/share/sbcl/sbcl
|
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $out/share/sbcl/sbcl
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = with stdenv.lib; {
|
||||||
description = "Lisp compiler";
|
description = "Lisp compiler";
|
||||||
homepage = "http://www.sbcl.org";
|
homepage = "http://www.sbcl.org";
|
||||||
license = "bsd";
|
license = licenses.publicDomain; # and FreeBSD
|
||||||
maintainers = [stdenv.lib.maintainers.raskin];
|
maintainers = [maintainers.raskin];
|
||||||
platforms = stdenv.lib.platforms.unix;
|
platforms = attrNames options;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -72,12 +72,7 @@ stdenv.mkDerivation rec {
|
|||||||
INSTALL_ROOT=$out sh install.sh
|
INSTALL_ROOT=$out sh install.sh
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = sbclBootstrap.meta // {
|
||||||
description = "Lisp compiler";
|
|
||||||
homepage = http://www.sbcl.org;
|
|
||||||
license = stdenv.lib.licenses.bsd3;
|
|
||||||
maintainers = [stdenv.lib.maintainers.raskin];
|
|
||||||
platforms = stdenv.lib.platforms.all;
|
|
||||||
inherit version;
|
inherit version;
|
||||||
updateWalker = true;
|
updateWalker = true;
|
||||||
};
|
};
|
||||||
|
@ -8,8 +8,8 @@ stdenv.mkDerivation rec {
|
|||||||
url = "http://www.software-lab.de/${name}.tgz";
|
url = "http://www.software-lab.de/${name}.tgz";
|
||||||
sha256 = "01kgyz0lkz36lxvibv07qd06gwdxvvbain9f9cnya7a12kq3009i";
|
sha256 = "01kgyz0lkz36lxvibv07qd06gwdxvvbain9f9cnya7a12kq3009i";
|
||||||
};
|
};
|
||||||
buildInputs = if stdenv.is64bit then [ jdk ] else [];
|
buildInputs = optional stdenv.is64bit jdk;
|
||||||
patchPhase = if stdenv.isArm then ''
|
patchPhase = optionalString stdenv.isArm ''
|
||||||
sed -i s/-m32//g Makefile
|
sed -i s/-m32//g Makefile
|
||||||
cat >>Makefile <<EOF
|
cat >>Makefile <<EOF
|
||||||
ext.o: ext.c
|
ext.o: ext.c
|
||||||
@ -17,8 +17,7 @@ stdenv.mkDerivation rec {
|
|||||||
ht.o: ht.c
|
ht.o: ht.c
|
||||||
\$(CC) \$(CFLAGS) -fPIC -D_OS='"\$(OS)"' \$*.c
|
\$(CC) \$(CFLAGS) -fPIC -D_OS='"\$(OS)"' \$*.c
|
||||||
EOF
|
EOF
|
||||||
''
|
'';
|
||||||
else "";
|
|
||||||
sourceRoot = ''picoLisp/src${optionalString stdenv.is64bit "64"}'';
|
sourceRoot = ''picoLisp/src${optionalString stdenv.is64bit "64"}'';
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
cd ..
|
cd ..
|
||||||
|
Loading…
x
Reference in New Issue
Block a user