summary refs log tree commit diff
path: root/pkgs/common-updater
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2018-02-16 13:59:25 +0100
committerTuomas Tynkkynen <tuomas.tynkkynen@iki.fi>2018-02-17 11:38:15 +0200
commit7934a0e5c5aac6545b1ea27b3ef196e228aa2b09 (patch)
tree5842652e523b55b7c6ce373f8cdc34619cf96fc0 /pkgs/common-updater
parent71a32c36fed7ce9a006329bcd45a29311d6a05b3 (diff)
downloadnixpkgs-7934a0e5c5aac6545b1ea27b3ef196e228aa2b09.tar
nixpkgs-7934a0e5c5aac6545b1ea27b3ef196e228aa2b09.tar.gz
nixpkgs-7934a0e5c5aac6545b1ea27b3ef196e228aa2b09.tar.bz2
nixpkgs-7934a0e5c5aac6545b1ea27b3ef196e228aa2b09.tar.lz
nixpkgs-7934a0e5c5aac6545b1ea27b3ef196e228aa2b09.tar.xz
nixpkgs-7934a0e5c5aac6545b1ea27b3ef196e228aa2b09.tar.zst
nixpkgs-7934a0e5c5aac6545b1ea27b3ef196e228aa2b09.zip
common-update-scripts: fix compatibility with Nix unstable
Diffstat (limited to 'pkgs/common-updater')
-rwxr-xr-xpkgs/common-updater/scripts/update-source-version2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/common-updater/scripts/update-source-version b/pkgs/common-updater/scripts/update-source-version
index 5922f3f30cf..ae2d023a039 100755
--- a/pkgs/common-updater/scripts/update-source-version
+++ b/pkgs/common-updater/scripts/update-source-version
@@ -74,7 +74,7 @@ fi
 if [ -z "$newHash" ]; then
     nix-build --no-out-link -A "$attr.src" 2>"$attr.fetchlog" >/dev/null || true
     # FIXME: use nix-build --hash here once https://github.com/NixOS/nix/issues/1172 is fixed
-    newHash=$(egrep -v "killing process|dependencies couldn't be built" "$attr.fetchlog" | tail -n2 | grep "output path .* has .* hash .* when .* was expected" | head -n1 | tr -dc '\040-\177' | tr -d "'" | awk '{ print $(NF-4) }')
+    newHash=$(egrep -v "killing process|dependencies couldn't be built" "$attr.fetchlog" | tail -n2 | sed "s~output path .* has .* hash \(.*\) when .* was expected|fixed-output derivation produced path '.*' with .* hash '\(.*\)' instead of the expected hash '.*'~\1\2~" | head -n1)
 fi
 
 if [ -z "$newHash" ]; then