nixpkgs/pkgs/development/compilers/sbcl/bootstrap.nix

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

32 lines
921 B
Nix
Raw Permalink Normal View History

{ lib, stdenv, fetchurl, makeWrapper, cfg }:
2014-06-26 05:06:25 +00:00
stdenv.mkDerivation rec {
pname = "sbcl-bootstrap";
inherit (cfg) version;
2014-06-26 05:06:25 +00: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 05:06:25 +00:00
installPhase = ''
2014-07-22 09:01:32 +00:00
mkdir -p $out/bin
2014-06-26 05:06:25 +00:00
cp -p src/runtime/sbcl $out/bin
2014-07-22 09:01:32 +00:00
mkdir -p $out/share/sbcl
cp -p src/runtime/sbcl $out/share/sbcl
2014-06-26 05:06:25 +00: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.hostPlatform.isAarch32 && stdenv.hostPlatform.isLinux) ''
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $out/share/sbcl/sbcl
2014-06-26 05:06:25 +00:00
'';
meta.sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
2014-06-26 05:06:25 +00:00
}