fix(build): Only take the first matching hash for source hashing

Some Nix download mechanisms will add a second hash in the store path,
which had been added to the source hash output (breaking argument
interpolation).
This commit is contained in:
Vincent Ambo 2019-10-11 13:55:10 +01:00 committed by Vincent Ambo
parent 1853c74998
commit cca835ae37

View file

@ -23,7 +23,7 @@ rec {
# builds to distinguish errors between deployed versions, see
# server/logs.go for details.
nixery-src-hash = pkgs.runCommand "nixery-src-hash" {} ''
echo ${./.} | grep -Eo '[a-z0-9]{32}' > $out
echo ${./.} | grep -Eo '[a-z0-9]{32}' | head -c 32 > $out
'';
# Go implementation of the Nixery server which implements the