summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2015-10-01 11:20:24 +0200
committerVladimír Čunát <vcunat@gmail.com>2015-10-01 11:20:24 +0200
commit673f3de193b5328e7c3906ebf22114956a264e96 (patch)
treee3b2e6b764d4aba3618d29570f8dcb0ba14b171d /pkgs/development/compilers
parent4e66ba1a70368ea9ba6f8af1dc931d54404bec72 (diff)
downloadnixlib-673f3de193b5328e7c3906ebf22114956a264e96.tar
nixlib-673f3de193b5328e7c3906ebf22114956a264e96.tar.gz
nixlib-673f3de193b5328e7c3906ebf22114956a264e96.tar.bz2
nixlib-673f3de193b5328e7c3906ebf22114956a264e96.tar.lz
nixlib-673f3de193b5328e7c3906ebf22114956a264e96.tar.xz
nixlib-673f3de193b5328e7c3906ebf22114956a264e96.tar.zst
nixlib-673f3de193b5328e7c3906ebf22114956a264e96.zip
lisps: some refactoring
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/ccl/default.nix16
-rw-r--r--pkgs/development/compilers/sbcl/bootstrap.nix10
-rw-r--r--pkgs/development/compilers/sbcl/default.nix7
3 files changed, 14 insertions, 19 deletions
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;
   };