nixpkgs/pkgs/by-name/sb/sbcl/bootstrap.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
830 B
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, makeWrapper, cfg }:
2014-06-26 06:06:25 +01:00
stdenv.mkDerivation rec {
pname = "sbcl-bootstrap";
inherit (cfg) version;
2014-06-26 06:06:25 +01:00
src = fetchurl {
url = "mirror://sourceforge/project/sbcl/sbcl/${version}/sbcl-${version}-${cfg.system}-binary.tar.bz2";
inherit (cfg) sha256;
};
nativeBuildInputs = [ makeWrapper ];
2014-06-26 06:06:25 +01:00
installPhase = ''
2014-07-22 10:01:32 +01:00
mkdir -p $out/bin
2014-06-26 06:06:25 +01:00
cp -p src/runtime/sbcl $out/bin
2014-07-22 10:01:32 +01:00
mkdir -p $out/share/sbcl
cp -p src/runtime/sbcl $out/share/sbcl
2014-06-26 06:06:25 +01:00
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 = lib.optionalString (!stdenv.isAarch32 && stdenv.isLinux) ''
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $out/share/sbcl/sbcl
2014-06-26 06:06:25 +01:00
'';
}