Skip to content

Commit

Permalink
update-vendor-hash: switch to nix-build
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic92 committed Aug 13, 2023
1 parent 29e05d9 commit 4655e1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion script/update-vendor-hash
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -exuo pipefail

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

failedbuild=$(nix build --impure --expr "import $SCRIPT_DIR/.. { vendorHash = ""; }" 2>&1 || true)
failedbuild=$(nix-build -E "import $SCRIPT_DIR/.. { vendorHash = \"\"; }" 2>&1 || true)
echo "$failedbuild"
checksum=$(echo "$failedbuild" | awk '/got:.*sha256/ { print $2 }')
sed -i -e "s|vendorHash ? \".*\"|vendorHash ? \"$checksum\"|" $SCRIPT_DIR/../default.nix

0 comments on commit 4655e1c

Please sign in to comment.