1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-01-22 14:45:27 +00:00

lisps: some refactoring

This commit is contained in:
Vladimír Čunát 2015-10-01 11:20:24 +02:00
parent 4e66ba1a70
commit 673f3de193
4 changed files with 17 additions and 23 deletions

View file

@ -1,11 +1,8 @@
{ 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
options = rec {
/* TODO: there are also MacOS, FreeBSD and Windows versions */
x86_64-linux = {
arch = "linuxx86";
sha256 = "04p77n18cw0bc8i66mp2vfrhlliahrx66lm004a3nw3h0mdk0gd8";
@ -28,6 +25,9 @@ let
};
cfg = options.${stdenv.system};
in
assert builtins.hasAttr stdenv.system options;
stdenv.mkDerivation rec {
name = "ccl-${version}";
version = "1.10";
@ -70,11 +70,11 @@ stdenv.mkDerivation rec {
chmod a+x "$out"/bin/"${CCL_RUNTIME}"
'';
meta = {
meta = with stdenv.lib; {
description = "Clozure Common Lisp";
homepage = http://ccl.clozure.com/;
maintainers = with stdenv.lib.maintainers; [ raskin muflax ];
platforms = stdenv.lib.platforms.linux;
license = stdenv.lib.licenses.lgpl21;
maintainers = with maintainers; [ raskin muflax ];
platforms = attrNames options;
license = licenses.lgpl21;
};
}

View file

@ -46,15 +46,15 @@ stdenv.mkDerivation rec {
--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
'';
meta = {
meta = with stdenv.lib; {
description = "Lisp compiler";
homepage = "http://www.sbcl.org";
license = "bsd";
maintainers = [stdenv.lib.maintainers.raskin];
platforms = stdenv.lib.platforms.unix;
license = licenses.publicDomain; # and FreeBSD
maintainers = [maintainers.raskin];
platforms = attrNames options;
};
}

View file

@ -72,12 +72,7 @@ stdenv.mkDerivation rec {
INSTALL_ROOT=$out sh install.sh
'';
meta = {
description = "Lisp compiler";
homepage = http://www.sbcl.org;
license = stdenv.lib.licenses.bsd3;
maintainers = [stdenv.lib.maintainers.raskin];
platforms = stdenv.lib.platforms.all;
meta = sbclBootstrap.meta // {
inherit version;
updateWalker = true;
};

View file

@ -8,8 +8,8 @@ stdenv.mkDerivation rec {
url = "http://www.software-lab.de/${name}.tgz";
sha256 = "01kgyz0lkz36lxvibv07qd06gwdxvvbain9f9cnya7a12kq3009i";
};
buildInputs = if stdenv.is64bit then [ jdk ] else [];
patchPhase = if stdenv.isArm then ''
buildInputs = optional stdenv.is64bit jdk;
patchPhase = optionalString stdenv.isArm ''
sed -i s/-m32//g Makefile
cat >>Makefile <<EOF
ext.o: ext.c
@ -17,8 +17,7 @@ stdenv.mkDerivation rec {
ht.o: ht.c
\$(CC) \$(CFLAGS) -fPIC -D_OS='"\$(OS)"' \$*.c
EOF
''
else "";
'';
sourceRoot = ''picoLisp/src${optionalString stdenv.is64bit "64"}'';
installPhase = ''
cd ..