about summary refs log tree commit diff
path: root/pkgs/development/compilers/sbcl/bootstrap.nix
diff options
context:
space:
mode:
authorHraban Luyat <hraban@0brg.net>2023-10-24 00:06:05 -0400
committerHraban Luyat <hraban@0brg.net>2023-10-25 23:31:05 -0400
commitea02d8a9a51734526dc88c422821a62db4fada94 (patch)
tree7e86e7d1993eb3bef24c4bb1ef3bef0dab2bbb7d /pkgs/development/compilers/sbcl/bootstrap.nix
parent51d906d2341c9e866e48c2efcaac0f2d70bfd43e (diff)
sbcl: support using CLISP as bootstrap host
Moves the bootstrap code into main derivation because it’s only used there, and
this helps let the main derivation decide when to evaluate it in the first
place (depending on the system), which helps on Hydra.

Not actually enabled by default on any systems yet.
Diffstat (limited to 'pkgs/development/compilers/sbcl/bootstrap.nix')
-rw-r--r--pkgs/development/compilers/sbcl/bootstrap.nix61
1 files changed, 3 insertions, 58 deletions
diff --git a/pkgs/development/compilers/sbcl/bootstrap.nix b/pkgs/development/compilers/sbcl/bootstrap.nix
index 05634d0c83f33..e23557c5a62fc 100644
--- a/pkgs/development/compilers/sbcl/bootstrap.nix
+++ b/pkgs/development/compilers/sbcl/bootstrap.nix
@@ -1,59 +1,12 @@
-{ lib, stdenv, fetchurl, makeWrapper }:
+{ lib, stdenv, fetchurl, makeWrapper, cfg }:
 
-let
-  options = rec {
-    aarch64-darwin = {
-      version = "2.1.2";
-      system = "arm64-darwin";
-      sha256 = "sha256-H0ALigXcWIypdA+fTf7jERscwbb7QIAfcoxCtGDh0RU=";
-    };
-    x86_64-darwin = {
-      version = "2.2.9";
-      system = "x86-64-darwin";
-      sha256 = "sha256-b1BLkoLIOELAYBYA9eBmMgm1OxMxJewzNP96C9ADfKY=";
-    };
-    x86_64-linux = {
-      version = "1.3.16";
-      system = "x86-64-linux";
-      sha256 = "0sq2dylwwyqfwkbdvcgqwz3vay9v895zpb0fyzsiwy31d1x9pr2s";
-    };
-    i686-linux = {
-      version = "1.2.7";
-      system = "x86-linux";
-      sha256 = "07f3bz4br280qvn85i088vpzj9wcz8wmwrf665ypqx181pz2ai3j";
-    };
-    aarch64-linux = {
-      version = "1.3.16";
-      system = "arm64-linux";
-      sha256 = "0q1brz9c49xgdljzfx8rpxxnlwhadxkcy5kg0mcd9wnxygind1cl";
-    };
-    armv7l-linux = {
-      version = "1.2.14";
-      system = "armhf-linux";
-      sha256 = "0sp5445rbvms6qvzhld0kwwvydw51vq5iaf4kdqsf2d9jvaz3yx5";
-    };
-    armv6l-linux = armv7l-linux;
-    x86_64-freebsd = {
-      version = "1.2.7";
-      system = "x86-64-freebsd";
-      sha256 = "14k42xiqd2rrim4pd5k5pjcrpkac09qnpynha8j1v4jngrvmw7y6";
-    };
-    x86_64-solaris = {
-      version = "1.2.7";
-      system = "x86-64-solaris";
-      sha256 = "05c12fmac4ha72k1ckl6i780rckd7jh4g5s5hiic7fjxnf1kx8d0";
-    };
-  };
-  cfg = options.${stdenv.hostPlatform.system};
-in
-assert builtins.hasAttr stdenv.hostPlatform.system options;
 stdenv.mkDerivation rec {
   pname = "sbcl-bootstrap";
-  version = cfg.version;
+  inherit (cfg) version;
 
   src = fetchurl {
     url = "mirror://sourceforge/project/sbcl/sbcl/${version}/sbcl-${version}-${cfg.system}-binary.tar.bz2";
-    sha256 = cfg.sha256;
+    inherit (cfg) sha256;
   };
 
   nativeBuildInputs = [ makeWrapper ];
@@ -73,12 +26,4 @@ stdenv.mkDerivation rec {
   postFixup = lib.optionalString (!stdenv.isAarch32 && stdenv.isLinux) ''
     patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $out/share/sbcl/sbcl
   '';
-
-  meta = with lib; {
-    description = "Lisp compiler";
-    homepage = "http://www.sbcl.org";
-    license = licenses.publicDomain; # and FreeBSD
-    maintainers = lib.teams.lisp.members;
-    platforms = attrNames options;
-  };
 }