diff options
-rw-r--r-- | pkgs/development/compilers/ccl/default.nix | 45 | ||||
-rw-r--r-- | pkgs/development/compilers/sbcl/bootstrap.nix | 63 | ||||
-rw-r--r-- | pkgs/development/compilers/sbcl/default.nix | 33 | ||||
-rw-r--r-- | pkgs/development/interpreters/picolisp/default.nix | 15 | ||||
-rw-r--r-- | pkgs/development/lisp-modules/lisp-packages.nix | 8 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 4 |
6 files changed, 110 insertions, 58 deletions
diff --git a/pkgs/development/compilers/ccl/default.nix b/pkgs/development/compilers/ccl/default.nix index 3522e234fa2..de6a041871e 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 015d7dd95da..0b5b48e088e 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" + ''; + + 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 2d6a3a45147..661279db1a9 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 fdeb950bcfd..c43a3ce2429 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 <<EOF + ext.o: ext.c + \$(CC) \$(CFLAGS) -fPIC -D_OS='"\$(OS)"' \$*.c + ht.o: ht.c + \$(CC) \$(CFLAGS) -fPIC -D_OS='"\$(OS)"' \$*.c + EOF + ''; sourceRoot = ''picoLisp/src${optionalString stdenv.is64bit "64"}''; installPhase = '' cd .. diff --git a/pkgs/development/lisp-modules/lisp-packages.nix b/pkgs/development/lisp-modules/lisp-packages.nix index 07372153032..36e0b34e005 100644 --- a/pkgs/development/lisp-modules/lisp-packages.nix +++ b/pkgs/development/lisp-modules/lisp-packages.nix @@ -196,7 +196,7 @@ let lispPackages = rec { # Source type: git src = pkgs.fetchgit { url = - #''http://git.b9.com/clsql.git'' + #''http://git.kpe.io/clsql.git'' "http://repo.or.cz/r/clsql.git" ; sha256 = "1wzc7qsnq8hk0j0h9jmj4xczmh7h6njafwab2zylh8wxmfzwp2nw"; @@ -217,7 +217,7 @@ let lispPackages = rec { deps = []; # Source type: git src = pkgs.fetchgit { - url = ''http://git.b9.com/uffi.git''; + url = ''http://git.kpe.io/uffi.git''; sha256 = "219e4cfebfac251c922bcb9d517980b0988d765bd18b7f5cc765a43913aaacc6"; rev = ''a63da5b764b6fa30e32fcda4ddac88de385c9d5b''; }; @@ -467,7 +467,7 @@ let lispPackages = rec { deps = []; # Source type: git src = pkgs.fetchgit { - url = ''http://git.b9.com/cl-base64.git''; + url = ''http://git.kpe.io/cl-base64.git''; sha256 = "a34196544cc67d54aef74e31eff2cee62a7861a5675d010fcd925f1c61c23e81"; rev = ''f375d1fc3a6616e95ae88bb33493bb99f920ba13''; }; @@ -480,7 +480,7 @@ let lispPackages = rec { deps = []; # Source type: git src = pkgs.fetchgit { - url = ''http://git.b9.com/puri.git''; + url = ''http://git.kpe.io/puri.git''; sha256 = "71804698e7f3009fb7f570656af5d952465bfe77f72e9c41f7e2dda8a5b45c5e"; rev = ''68260dbf320c01089c8cee54ef32c800eefcde7f''; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index baaa2661959..5bb5c818378 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4701,9 +4701,7 @@ let rustfmt = callPackage ../development/tools/rust/rustfmt { }; sbclBootstrap = callPackage ../development/compilers/sbcl/bootstrap.nix {}; - sbcl = callPackage ../development/compilers/sbcl { - clisp = clisp; - }; + sbcl = callPackage ../development/compilers/sbcl {}; # For StumpWM sbcl_1_2_5 = callPackage ../development/compilers/sbcl/1.2.5.nix { clisp = clisp; |