uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
4
pkgs/development/compilers/sbcl/2.0.8.nix
Normal file
4
pkgs/development/compilers/sbcl/2.0.8.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import ./common.nix {
|
||||
version = "2.0.8";
|
||||
sha256 = "1xwrwvps7drrpyw3wg5h3g2qajmkwqs9gz0fdw1ns9adp7vld390";
|
||||
}
|
||||
4
pkgs/development/compilers/sbcl/2.0.9.nix
Normal file
4
pkgs/development/compilers/sbcl/2.0.9.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import ./common.nix {
|
||||
version = "2.0.9";
|
||||
sha256 = "17wvrcwgp45z9b6arik31fjnz7908qhr5ackxq1y0gqi1hsh1xy4";
|
||||
}
|
||||
4
pkgs/development/compilers/sbcl/2.1.1.nix
Normal file
4
pkgs/development/compilers/sbcl/2.1.1.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import ./common.nix {
|
||||
version = "2.1.1";
|
||||
sha256 = "15wa66sachhzgvg5n35vihmkpasg100lh561c1d1bdrql0p8kbd9";
|
||||
}
|
||||
4
pkgs/development/compilers/sbcl/2.1.10.nix
Normal file
4
pkgs/development/compilers/sbcl/2.1.10.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import ./common.nix {
|
||||
version = "2.1.10";
|
||||
sha256 = "0f5ihj486m7ghh3nc0jlnqa656sbqcmhdv32syz2rjx5b47ky67b";
|
||||
}
|
||||
4
pkgs/development/compilers/sbcl/2.1.11.nix
Normal file
4
pkgs/development/compilers/sbcl/2.1.11.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import ./common.nix {
|
||||
version = "2.1.11";
|
||||
sha256 = "1zgypmn19c58pv7j33ga7m1l7lzghj70w3xbybpgmggxwwflihdz";
|
||||
}
|
||||
4
pkgs/development/compilers/sbcl/2.1.2.nix
Normal file
4
pkgs/development/compilers/sbcl/2.1.2.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import ./common.nix {
|
||||
version = "2.1.2";
|
||||
sha256 = "sha256:02scrqyp2izsd8xjm2k5j5lhn4pdhd202jlcb54ysmcqjd80awdp";
|
||||
}
|
||||
4
pkgs/development/compilers/sbcl/2.1.9.nix
Normal file
4
pkgs/development/compilers/sbcl/2.1.9.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import ./common.nix {
|
||||
version = "2.1.9";
|
||||
sha256 = "189gjqzdz10xh3ybiy4ch1r98bsmkcb4hpnrmggd4y2g5kqnyx4y";
|
||||
}
|
||||
4
pkgs/development/compilers/sbcl/2.2.4.nix
Normal file
4
pkgs/development/compilers/sbcl/2.2.4.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import ./common.nix {
|
||||
version = "2.2.4";
|
||||
sha256 = "sha256-/N0lHLxl9/gI7QrXckaEjRvhZqppoX90mWABhLelcgI=";
|
||||
}
|
||||
84
pkgs/development/compilers/sbcl/bootstrap.nix
Normal file
84
pkgs/development/compilers/sbcl/bootstrap.nix
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
{ lib, stdenv, fetchurl, makeWrapper }:
|
||||
|
||||
let
|
||||
options = rec {
|
||||
aarch64-darwin = {
|
||||
version = "2.1.2";
|
||||
system = "arm64-darwin";
|
||||
sha256 = "sha256-H0ALigXcWIypdA+fTf7jERscwbb7QIAfcoxCtGDh0RU=";
|
||||
};
|
||||
x86_64-darwin = {
|
||||
version = "1.2.11";
|
||||
system = "x86-64-darwin";
|
||||
sha256 = "0lh4gpvi8hl6g6b9321g5pwh8sk3218i7h4lx7p3vd9z0cf3lz85";
|
||||
};
|
||||
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;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/project/sbcl/sbcl/${version}/sbcl-${version}-${cfg.system}-binary.tar.bz2";
|
||||
sha256 = cfg.sha256;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ 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 = 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 = [maintainers.raskin maintainers.tohl];
|
||||
platforms = attrNames options;
|
||||
};
|
||||
}
|
||||
123
pkgs/development/compilers/sbcl/common.nix
Normal file
123
pkgs/development/compilers/sbcl/common.nix
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
{ version, sha256 }:
|
||||
|
||||
{ lib, stdenv, fetchurl, fetchpatch, writeText, sbclBootstrap
|
||||
, sbclBootstrapHost ? "${sbclBootstrap}/bin/sbcl --disable-debugger --no-userinit --no-sysinit"
|
||||
, threadSupport ? (stdenv.hostPlatform.isx86 || "aarch64-linux" == stdenv.hostPlatform.system || "aarch64-darwin" == stdenv.hostPlatform.system)
|
||||
, linkableRuntime ? stdenv.hostPlatform.isx86
|
||||
, disableImmobileSpace ? false
|
||||
# Meant for sbcl used for creating binaries portable to non-NixOS via save-lisp-and-die.
|
||||
# Note that the created binaries still need `patchelf --set-interpreter ...`
|
||||
# to get rid of ${glibc} dependency.
|
||||
, purgeNixReferences ? false
|
||||
, texinfo
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "sbcl";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/project/sbcl/sbcl/${version}/${pname}-${version}-source.tar.bz2";
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
buildInputs = [texinfo];
|
||||
|
||||
patches = lib.optional
|
||||
(lib.versionAtLeast version "2.1.2" && lib.versionOlder version "2.1.8")
|
||||
(fetchpatch {
|
||||
# Fix segfault on ARM when reading large core files
|
||||
url = "https://github.com/sbcl/sbcl/commit/8fa3f76fba2e8572e86ac6fc5754e6b2954fc774.patch";
|
||||
sha256 = "1ic531pjnws1k3xd03a5ixbq8cn10dlh2nfln59k0vbm0253g3lv";
|
||||
});
|
||||
|
||||
postPatch = ''
|
||||
echo '"${version}.nixos"' > version.lisp-expr
|
||||
|
||||
# SBCL checks whether files are up-to-date in many places..
|
||||
# Unfortunately, same timestamp is not good enough
|
||||
sed -e 's@> x y@>= x y@' -i contrib/sb-aclrepl/repl.lisp
|
||||
#sed -e '/(date)/i((= date 2208988801) 2208988800)' -i contrib/asdf/asdf.lisp
|
||||
sed -i src/cold/slam.lisp -e \
|
||||
'/file-write-date input/a)'
|
||||
sed -i src/cold/slam.lisp -e \
|
||||
'/file-write-date output/i(or (and (= 2208988801 (file-write-date output)) (= 2208988801 (file-write-date input)))'
|
||||
sed -i src/code/target-load.lisp -e \
|
||||
'/date defaulted-fasl/a)'
|
||||
sed -i src/code/target-load.lisp -e \
|
||||
'/date defaulted-source/i(or (and (= 2208988801 (file-write-date defaulted-source-truename)) (= 2208988801 (file-write-date defaulted-fasl-truename)))'
|
||||
|
||||
# Fix the tests
|
||||
sed -e '5,$d' -i contrib/sb-bsd-sockets/tests.lisp
|
||||
sed -e '5,$d' -i contrib/sb-simple-streams/*test*.lisp
|
||||
''
|
||||
+ (if purgeNixReferences
|
||||
then
|
||||
# This is the default location to look for the core; by default in $out/lib/sbcl
|
||||
''
|
||||
sed 's@^\(#define SBCL_HOME\) .*$@\1 "/no-such-path"@' \
|
||||
-i src/runtime/runtime.c
|
||||
''
|
||||
else
|
||||
# Fix software version retrieval
|
||||
''
|
||||
sed -e "s@/bin/uname@$(command -v uname)@g" -i src/code/*-os.lisp \
|
||||
src/code/run-program.lisp
|
||||
''
|
||||
);
|
||||
|
||||
|
||||
preBuild = ''
|
||||
export INSTALL_ROOT=$out
|
||||
mkdir -p test-home
|
||||
export HOME=$PWD/test-home
|
||||
'';
|
||||
|
||||
enableFeatures = with lib;
|
||||
optional threadSupport "sb-thread" ++
|
||||
optional linkableRuntime "sb-linkable-runtime" ++
|
||||
optional stdenv.isAarch32 "arm";
|
||||
|
||||
disableFeatures = with lib;
|
||||
optional (!threadSupport) "sb-thread" ++
|
||||
optionals disableImmobileSpace [ "immobile-space" "immobile-code" "compact-instance-header" ];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
sh make.sh --prefix=$out --xc-host="${sbclBootstrapHost}" ${
|
||||
lib.concatStringsSep " "
|
||||
(builtins.map (x: "--with-${x}") enableFeatures ++
|
||||
builtins.map (x: "--without-${x}") disableFeatures)
|
||||
} ${if stdenv.hostPlatform.system == "aarch64-darwin" then "--arch=arm64" else ""}
|
||||
(cd doc/manual ; make info)
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
INSTALL_ROOT=$out sh install.sh
|
||||
|
||||
runHook postInstall
|
||||
''
|
||||
+ lib.optionalString (!purgeNixReferences) ''
|
||||
cp -r src $out/lib/sbcl
|
||||
cp -r contrib $out/lib/sbcl
|
||||
cat >$out/lib/sbcl/sbclrc <<EOF
|
||||
(setf (logical-pathname-translations "SYS")
|
||||
'(("SYS:SRC;**;*.*.*" #P"$out/lib/sbcl/src/**/*.*")
|
||||
("SYS:CONTRIB;**;*.*.*" #P"$out/lib/sbcl/contrib/**/*.*")))
|
||||
EOF
|
||||
'';
|
||||
|
||||
setupHook = lib.optional purgeNixReferences (writeText "setupHook.sh" ''
|
||||
addEnvHooks "$targetOffset" _setSbclHome
|
||||
_setSbclHome() {
|
||||
export SBCL_HOME='@out@/lib/sbcl/'
|
||||
}
|
||||
'');
|
||||
|
||||
meta = sbclBootstrap.meta;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue