mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 07:53:19 +00:00
Merge pull request #336488 from rhelmot/freebsd-stdenv-no-features
stdenv/freebsd: build bootstrap files without recursive-nix feature
This commit is contained in:
commit
3014c8befc
@ -1,21 +1,18 @@
|
||||
{ pkgs ? import ../../.. {} }:
|
||||
let
|
||||
inherit (pkgs) runCommand lib;
|
||||
inherit (pkgs) runCommand closureInfo;
|
||||
# splicing doesn't seem to work right here
|
||||
inherit (pkgs.buildPackages) nix rsync;
|
||||
inherit (pkgs.buildPackages) dumpnar rsync;
|
||||
pack-all =
|
||||
packCmd: name: pkgs: fixups:
|
||||
(runCommand name {
|
||||
requiredSystemFeatures = [ "recursive-nix" ];
|
||||
nativeBuildInputs = [ nix rsync ];
|
||||
nativeBuildInputs = [ rsync dumpnar ];
|
||||
} ''
|
||||
base=$PWD
|
||||
requisites="$(nix-store --query --requisites ${lib.concatStringsSep " " pkgs} | tac)"
|
||||
|
||||
rm -f $base/nix-support/propagated-build-inputs
|
||||
requisites="$(cat ${closureInfo { rootPaths = pkgs; }}/store-paths)"
|
||||
for f in $requisites; do
|
||||
cd $f
|
||||
rsync --chmod="+w" -av . $base
|
||||
rsync --safe-links --chmod="+w" -av . $base
|
||||
done
|
||||
cd $base
|
||||
|
||||
@ -28,14 +25,14 @@
|
||||
cat $f >>"$base/nix-support/$f"
|
||||
done
|
||||
done
|
||||
rm -f $base/nix-support/propagated-build-inputs
|
||||
cd $base
|
||||
|
||||
${fixups}
|
||||
|
||||
rm .nix-socket
|
||||
${packCmd}
|
||||
'');
|
||||
nar-all = pack-all "nix-store --dump . | xz -9 -e -T $NIX_BUILD_CORES >$out";
|
||||
nar-all = pack-all "dumpnar . | xz -9 -e -T $NIX_BUILD_CORES >$out";
|
||||
tar-all = pack-all "XZ_OPT=\"-9 -e -T $NIX_BUILD_CORES\" tar cJf $out --hard-dereference --sort=name --numeric-owner --owner=0 --group=0 --mtime=@1 .";
|
||||
coreutils-big = pkgs.coreutils.override { singleBinary = false; };
|
||||
mkdir = runCommand "mkdir" { coreutils = coreutils-big; } ''
|
||||
|
Loading…
Reference in New Issue
Block a user