From f3a104c11a29d6b3bdc90fcce5cf172aa5f22d5a Mon Sep 17 00:00:00 2001 From: Audrey Dutcher Date: Thu, 22 Aug 2024 00:09:55 -0700 Subject: [PATCH] stdenv/freebsd: do not require recursive-nix --- pkgs/stdenv/freebsd/make-bootstrap-tools.nix | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/pkgs/stdenv/freebsd/make-bootstrap-tools.nix b/pkgs/stdenv/freebsd/make-bootstrap-tools.nix index 91980364167c..65ee23eb0686 100644 --- a/pkgs/stdenv/freebsd/make-bootstrap-tools.nix +++ b/pkgs/stdenv/freebsd/make-bootstrap-tools.nix @@ -1,18 +1,15 @@ { 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 --safe-links --chmod="+w" -av . $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; } ''