diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/audio/spotify')
-rw-r--r-- | nixpkgs/pkgs/applications/audio/spotify/linux.nix | 6 | ||||
-rwxr-xr-x | nixpkgs/pkgs/applications/audio/spotify/update.sh | 7 |
2 files changed, 6 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/applications/audio/spotify/linux.nix b/nixpkgs/pkgs/applications/audio/spotify/linux.nix index 117d2325ce36..239d03268245 100644 --- a/nixpkgs/pkgs/applications/audio/spotify/linux.nix +++ b/nixpkgs/pkgs/applications/audio/spotify/linux.nix @@ -14,14 +14,14 @@ let # If an update breaks things, one of those might have valuable info: # https://aur.archlinux.org/packages/spotify/ # https://community.spotify.com/t5/Desktop-Linux - version = "1.2.11.916.geb595a67"; + version = "1.2.13.661.ga588f749"; # To get the latest stable revision: # curl -H 'X-Ubuntu-Series: 16' 'https://api.snapcraft.io/api/v1/snaps/details/spotify?channel=stable' | jq '.download_url,.version,.last_updated' # To get general information: # curl -H 'Snap-Device-Series: 16' 'https://api.snapcraft.io/v2/snaps/info/spotify' | jq '.' # More examples of api usage: # https://github.com/canonical-websites/snapcraft.io/blob/master/webapp/publisher/snaps/views.py - rev = "67"; + rev = "68"; deps = [ alsa-lib @@ -84,7 +84,7 @@ stdenv.mkDerivation { # https://community.spotify.com/t5/Desktop-Linux/Redistribute-Spotify-on-Linux-Distributions/td-p/1695334 src = fetchurl { url = "https://api.snapcraft.io/api/v1/snaps/download/pOBIoZ2LrCB3rDohMxoYGnbN14EHOgD7_${rev}.snap"; - sha512 = "3d5a9fda88a076a22bb6d0b6b586334865f03a4e852ca8e022468e3dd3520a81dea314721e26e54ba9309603e08f66588f005ee8970e73eccbf805ff70e89dca"; + hash = "sha512-THGSRx0sGOVEB6bOHWHiy1G0Acq0hUa94tG/v+i5DA+CluI58pqj8gYQ61k/ACLJXTUyM8SA92C8DK1Go18X8w=="; }; nativeBuildInputs = [ wrapGAppsHook makeShellWrapper squashfsTools ]; diff --git a/nixpkgs/pkgs/applications/audio/spotify/update.sh b/nixpkgs/pkgs/applications/audio/spotify/update.sh index 8c466e836cd2..9bd983755c71 100755 --- a/nixpkgs/pkgs/applications/audio/spotify/update.sh +++ b/nixpkgs/pkgs/applications/audio/spotify/update.sh @@ -39,12 +39,11 @@ snap_info=($( # just for human consumption. Revision is just an integer that gets increased # by one every (stable or unstable) release. revision="${snap_info[0]}" -sha512="${snap_info[1]}" +# We need to escape the slashes +hash="$(nix-hash --to-sri --type sha512 ${snap_info[1]} | sed 's|/|\\/|g')" upstream_version="${snap_info[2]}" last_updated="${snap_info[3]}" - echo "Latest $channel release is $upstream_version from $last_updated." - # # read the current spotify version from the currently *committed* nix expression # @@ -70,7 +69,7 @@ echo "Updating from ${current_nix_version} to ${upstream_version}, released on $ # search-and-replace revision, hash and version sed --regexp-extended \ -e 's/rev\s*=\s*"[0-9]+"\s*;/rev = "'"${revision}"'";/' \ - -e 's/sha512\s*=\s*"[^"]*"\s*;/sha512 = "'"${sha512}"'";/' \ + -e 's/hash\s*=\s*"[^"]*"\s*;/hash = "'"${hash}"'";/' \ -e 's/version\s*=\s*".*"\s*;/version = "'"${upstream_version}"'";/' \ -i "$spotify_nix" |