vendorhash calc automation
This commit is contained in:
parent
e1909b04b2
commit
1321374a90
7 changed files with 40 additions and 52 deletions
10
scripts/update-vendor-hash.sh
Executable file
10
scripts/update-vendor-hash.sh
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p nix -p coreutils -p gnused -p gawk
|
||||
|
||||
set -exuo pipefail
|
||||
|
||||
go mod tidy
|
||||
failedbuild=$(nix build --impure --expr '(with import <nixpkgs> {}; pkgs.callPackage ./. { vendorHash = ""; }).roleypoly' 2>&1 || true)
|
||||
echo "$failedbuild"
|
||||
checksum=$(echo "$failedbuild" | awk '/got:.*sha256/ { print $2 }')
|
||||
sed -i -e "s|vendorHash ? \".*\"|vendorHash ? \"$checksum\"|" default.nix
|
Loading…
Add table
Add a link
Reference in a new issue