From c2aa524d6433a514fa434bf7b94da365dbf2f6ac Mon Sep 17 00:00:00 2001 From: Stefan Junker Date: Mon, 3 Jan 2022 21:03:05 +0100 Subject: [PATCH] update to nixUnstable --- nix/os/profiles/common/system.nix | 1 + nix/scripts/pre-eval-fixed.sh | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/nix/os/profiles/common/system.nix b/nix/os/profiles/common/system.nix index 99b6ef8..82ea2e1 100644 --- a/nix/os/profiles/common/system.nix +++ b/nix/os/profiles/common/system.nix @@ -22,6 +22,7 @@ nix.maxJobs = lib.mkDefault "auto"; nix.buildCores = lib.mkDefault 0; nix.useSandbox = true; + nix.package = pkgs.nixUnstable; environment.etc."lvm/lvm.conf".text = '' devices { diff --git a/nix/scripts/pre-eval-fixed.sh b/nix/scripts/pre-eval-fixed.sh index e6bc4a0..d6d8309 100755 --- a/nix/scripts/pre-eval-fixed.sh +++ b/nix/scripts/pre-eval-fixed.sh @@ -2,5 +2,7 @@ set -xe INFILE="${1:?Please set arg1 to INFILE}" OUTFILE="${2:?Please set arg2 to OUTFILE}" -hash=$(nix-build ${INFILE} --arg pkgs 'import {}' --arg config 'null' 2>&1 | rg -o 'got.*sha256:([0-9a-z]{52})' -r '$1') +# sha256-1fm94N2Y9ptXVN6ni0nJyPRK+nsvoeliqBcFyjlaTH4= +hash=$(nix-build ${INFILE} --arg pkgs 'import {}' --arg config 'null' 2>&1 | rg -o 'got.*(sha256-.{44})' -r '$1') + sed -E "s/0{52}/${hash}/" ${INFILE} > ${OUTFILE}