diff --git a/pkgs/development/compilers/ccl/default.nix b/pkgs/development/compilers/ccl/default.nix index 30eb528cab71..de6a041871ea 100644 --- a/pkgs/development/compilers/ccl/default.nix +++ b/pkgs/development/compilers/ccl/default.nix @@ -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; }; } diff --git a/pkgs/development/compilers/sbcl/bootstrap.nix b/pkgs/development/compilers/sbcl/bootstrap.nix index 8c1a6e27a769..0b5b48e088ee 100644 --- a/pkgs/development/compilers/sbcl/bootstrap.nix +++ b/pkgs/development/compilers/sbcl/bootstrap.nix @@ -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; }; } diff --git a/pkgs/development/compilers/sbcl/default.nix b/pkgs/development/compilers/sbcl/default.nix index 534e54f03962..661279db1a90 100644 --- a/pkgs/development/compilers/sbcl/default.nix +++ b/pkgs/development/compilers/sbcl/default.nix @@ -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; }; diff --git a/pkgs/development/interpreters/picolisp/default.nix b/pkgs/development/interpreters/picolisp/default.nix index 496a4ff66681..c43a3ce2429b 100644 --- a/pkgs/development/interpreters/picolisp/default.nix +++ b/pkgs/development/interpreters/picolisp/default.nix @@ -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 ..