···39# just for human consumption. Revision is just an integer that gets increased
40# by one every (stable or unstable) release.
41revision="${snap_info[0]}"
42-sha512="${snap_info[1]}"
043upstream_version="${snap_info[2]}"
44last_updated="${snap_info[3]}"
45-46echo "Latest $channel release is $upstream_version from $last_updated."
47-48#
49# read the current spotify version from the currently *committed* nix expression
50#
···70# search-and-replace revision, hash and version
71sed --regexp-extended \
72 -e 's/rev\s*=\s*"[0-9]+"\s*;/rev = "'"${revision}"'";/' \
73- -e 's/sha512\s*=\s*"[^"]*"\s*;/sha512 = "'"${sha512}"'";/' \
74 -e 's/version\s*=\s*".*"\s*;/version = "'"${upstream_version}"'";/' \
75 -i "$spotify_nix"
76
···39# just for human consumption. Revision is just an integer that gets increased
40# by one every (stable or unstable) release.
41revision="${snap_info[0]}"
42+# We need to escape the slashes
43+hash="$(nix-hash --to-sri --type sha512 ${snap_info[1]} | sed 's|/|\\/|g')"
44upstream_version="${snap_info[2]}"
45last_updated="${snap_info[3]}"
046echo "Latest $channel release is $upstream_version from $last_updated."
047#
48# read the current spotify version from the currently *committed* nix expression
49#
···69# search-and-replace revision, hash and version
70sed --regexp-extended \
71 -e 's/rev\s*=\s*"[0-9]+"\s*;/rev = "'"${revision}"'";/' \
72+ -e 's/hash\s*=\s*"[^"]*"\s*;/hash = "'"${hash}"'";/' \
73 -e 's/version\s*=\s*".*"\s*;/version = "'"${upstream_version}"'";/' \
74 -i "$spotify_nix"
75