diff --git a/pkgs/development/compilers/ccl/default.nix b/pkgs/development/compilers/ccl/default.nix index 3522e234fa2a..de6a041871ea 100644 --- a/pkgs/development/compilers/ccl/default.nix +++ b/pkgs/development/compilers/ccl/default.nix @@ -1,7 +1,32 @@ { 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"; +let + options = rec { + /* TODO: there are also MacOS, FreeBSD and Windows versions */ + x86_64-linux = { + arch = "linuxx86"; + sha256 = "04p77n18cw0bc8i66mp2vfrhlliahrx66lm004a3nw3h0mdk0gd8"; + runtime = "lx86cl64"; + kernel = "linuxx8664"; + }; + i686-linux = { + arch = "linuxx86"; + sha256 = x86_64-linux.sha256; + runtime = "lx86cl"; + kernel = "linuxx8632"; + }; + armv7l-linux = { + arch = "linuxarm"; + sha256 = "0xg9p1q1fpgyfhwjk2hh24vqzddzx5zqff04lycf0vml5qw1gnkv"; + runtime = "armcl"; + kernel = "linuxarm"; + }; + armv6l-linux = armv7l-linux; + }; + cfg = options.${stdenv.system}; +in + +assert builtins.hasAttr stdenv.system options; stdenv.mkDerivation rec { name = "ccl-${version}"; @@ -9,15 +34,15 @@ stdenv.mkDerivation rec { revision = "16313"; src = fetchsvn { - url = http://svn.clozure.com/publicsvn/openmcl/release/1.10/linuxx86/ccl; + url = "http://svn.clozure.com/publicsvn/openmcl/release/${version}/${cfg.arch}/ccl"; rev = revision; - sha256 = "04p77n18cw0bc8i66mp2vfrhlliahrx66lm004a3nw3h0mdk0gd8"; + sha256 = cfg.sha256; }; buildInputs = [ gcc glibc m4 ]; - CCL_RUNTIME = if stdenv.system == "x86_64-linux" then "lx86cl64" else "lx86cl"; - CCL_KERNEL = if stdenv.system == "x86_64-linux" then "linuxx8664" else "linuxx8632"; + CCL_RUNTIME = cfg.runtime; + CCL_KERNEL = cfg.kernel; patchPhase = '' substituteInPlace lisp-kernel/${CCL_KERNEL}/Makefile \ @@ -45,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 015d7dd95da8..0b5b48e088ee 100644 --- a/pkgs/development/compilers/sbcl/bootstrap.nix +++ b/pkgs/development/compilers/sbcl/bootstrap.nix @@ -1,31 +1,60 @@ -{ stdenv, fetchurl }: +{ stdenv, fetchurl, makeWrapper }: +let + options = rec { + x86_64-darwin = rec { + version = "1.1.8"; + system = "x86-64-darwin"; + sha256 = "006pr88053wclvbjfjdypnbiw8wymbzdzi7a6kbkpdfn4zf5943j"; + }; + x86_64-linux = rec { + version = "1.2.15"; + system = "x86-64-linux"; + sha256 = "1bpbfz9x2w73hy2kh8p0kd4m1p6pin90h2zycq52r3bbz8yv47aw"; + }; + i686-linux = rec { + version = "1.2.7"; + system = "x86-linux"; + sha256 = "07f3bz4br280qvn85i088vpzj9wcz8wmwrf665ypqx181pz2ai3j"; + }; + armv7l-linux = rec { + version = "1.2.14"; + system = "armhf-linux"; + sha256 = "0sp5445rbvms6qvzhld0kwwvydw51vq5iaf4kdqsf2d9jvaz3yx5"; + }; + armv6l-linux = armv7l-linux; + }; + cfg = options.${stdenv.system}; +in stdenv.mkDerivation rec { name = "sbcl-bootstrap-${version}"; - version = "1.1.8"; + version = cfg.version; - src = if stdenv.isDarwin - then fetchurl { - url = mirror://sourceforge/project/sbcl/sbcl/1.1.8/sbcl-1.1.8-x86-64-darwin-binary.tar.bz2; - sha256 = "006pr88053wclvbjfjdypnbiw8wymbzdzi7a6kbkpdfn4zf5943j"; - } - else fetchurl { - url = mirror://sourceforge/project/sbcl/sbcl/1.1.8/sbcl-1.1.8-x86-64-linux-binary.tar.bz2; - sha256 = "0lh1jglxlfwk4cm6sgwk1jnb6ikhbrkx7p5aha2nbmkd6zl96prx"; - }; + src = fetchurl { + url = "mirror://sourceforge/project/sbcl/sbcl/${version}/sbcl-${version}-${cfg.system}-binary.tar.bz2"; + sha256 = cfg.sha256; + }; + + buildInputs = [ makeWrapper ]; installPhase = '' - mkdir -p $out/bin - cp -p src/runtime/sbcl $out/bin mkdir -p $out/share/sbcl + cp -p src/runtime/sbcl $out/share/sbcl cp -p output/sbcl.core $out/share/sbcl + mkdir -p $out/bin + makeWrapper $out/share/sbcl/sbcl $out/bin/sbcl \ + --add-flags "--core $out/share/sbcl/sbcl.core" ''; - meta = { + postFixup = stdenv.lib.optionalString (!stdenv.isArm) '' + patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $out/share/sbcl/sbcl + ''; + + 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 2d6a3a451470..661279db1a90 100644 --- a/pkgs/development/compilers/sbcl/default.nix +++ b/pkgs/development/compilers/sbcl/default.nix @@ -1,18 +1,15 @@ -{ stdenv, fetchurl, sbclBootstrap, clisp, which}: +{ stdenv, fetchurl, sbclBootstrap, sbclBootstrapHost ? "${sbclBootstrap}/bin/sbcl --disable-debugger --no-userinit --no-sysinit", which }: stdenv.mkDerivation rec { name = "sbcl-${version}"; - version = "1.2.14"; + version = "1.2.15"; src = fetchurl { url = "mirror://sourceforge/project/sbcl/sbcl/${version}/${name}-source.tar.bz2"; - sha256 = "01jw1w5siv6q16y1vmgd7s1i22aq0cqaipgn12jvq18c8vb6s55r"; + sha256 = "0l8nrf5qnr8c9hr6bn1kd86mnr2s37b493azh9rrk3v59f56wnnr"; }; - buildInputs = [ which ] - ++ (stdenv.lib.optional stdenv.isDarwin sbclBootstrap) - ++ (stdenv.lib.optional stdenv.isLinux clisp) - ; + buildInputs = [ which ]; patchPhase = '' echo '"${version}.nixos"' > version.lisp-expr @@ -22,7 +19,10 @@ stdenv.mkDerivation rec { (pushnew x features)) (disable (x) (setf features (remove x features)))) - (enable :sb-thread))) " > customize-target-features.lisp + #-arm + (enable :sb-thread) + #+arm + (enable :arm))) " > customize-target-features.lisp pwd @@ -64,24 +64,15 @@ stdenv.mkDerivation rec { export HOME=$PWD/test-home ''; - buildPhase = if stdenv.isLinux - then '' - sh make.sh clisp --prefix=$out - '' - else '' - sh make.sh --prefix=$out --xc-host='${sbclBootstrap}/bin/sbcl --core ${sbclBootstrap}/share/sbcl/sbcl.core --disable-debugger --no-userinit --no-sysinit' - ''; + buildPhase = '' + sh make.sh --prefix=$out --xc-host="${sbclBootstrapHost}" + ''; installPhase = '' 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 fdeb950bcfd1..c43a3ce2429b 100644 --- a/pkgs/development/interpreters/picolisp/default.nix +++ b/pkgs/development/interpreters/picolisp/default.nix @@ -3,12 +3,21 @@ with stdenv.lib; stdenv.mkDerivation rec { name = "picoLisp-${version}"; - version = "3.1.10"; + version = "3.1.11"; src = fetchurl { url = "http://www.software-lab.de/${name}.tgz"; - sha256 = "1pn5c0d81rz1fazsdijhw4cqybaad2wn6qramdj2qqkzxa3vvll1"; + sha256 = "01kgyz0lkz36lxvibv07qd06gwdxvvbain9f9cnya7a12kq3009i"; }; - buildInputs = [ jdk ]; + buildInputs = optional stdenv.is64bit jdk; + patchPhase = optionalString stdenv.isArm '' + sed -i s/-m32//g Makefile + cat >>Makefile <