summary refs log tree commit diff
path: root/pkgs/applications/audio/spotify/default.nix
diff options
context:
space:
mode:
authorangristan <angristan@pm.me>2019-07-30 14:32:15 +0200
committerangristan <angristan@pm.me>2019-08-01 20:30:36 +0200
commit0e6d79b39f5de26b5455921b2f7891fba529fdb4 (patch)
treeffb3e6ef1ceb14304cb107a5d026f5d03201849e /pkgs/applications/audio/spotify/default.nix
parentac0d7ef8705a493a6284af5b7d8f39d66a212a6b (diff)
downloadnixpkgs-0e6d79b39f5de26b5455921b2f7891fba529fdb4.tar
nixpkgs-0e6d79b39f5de26b5455921b2f7891fba529fdb4.tar.gz
nixpkgs-0e6d79b39f5de26b5455921b2f7891fba529fdb4.tar.bz2
nixpkgs-0e6d79b39f5de26b5455921b2f7891fba529fdb4.tar.lz
nixpkgs-0e6d79b39f5de26b5455921b2f7891fba529fdb4.tar.xz
nixpkgs-0e6d79b39f5de26b5455921b2f7891fba529fdb4.tar.zst
nixpkgs-0e6d79b39f5de26b5455921b2f7891fba529fdb4.zip
spotify: 1.0.96.181 -> 1.1.10.546
See #57800 and #65081 for discussion around fixing the SIGSEV since 1.1.5

Fix taken from
https://gitweb.gentoo.org/repo/gentoo.git/commit/media-sound/spotify?id=d8c8d8abd012c709551cc96802d2615fa69b5212:

Adding apulse libraries to LD_LIBRARY_PATH make spotify work
even if pulseaudio is not installed. If pulseaudio is installed
instead of apulse, this has no effect.

Adding APULSE_PLAYBACK_DEVICE is also necessary otherwise apulse does
not find the device (inspired by the tor-browser-bundle derivation)
Diffstat (limited to 'pkgs/applications/audio/spotify/default.nix')
-rw-r--r--pkgs/applications/audio/spotify/default.nix12
1 files changed, 8 insertions, 4 deletions
diff --git a/pkgs/applications/audio/spotify/default.nix b/pkgs/applications/audio/spotify/default.nix
index 6e926fe11c3..44526eb594c 100644
--- a/pkgs/applications/audio/spotify/default.nix
+++ b/pkgs/applications/audio/spotify/default.nix
@@ -1,7 +1,7 @@
 { fetchurl, stdenv, squashfsTools, xorg, alsaLib, makeWrapper, openssl, freetype
 , glib, pango, cairo, atk, gdk_pixbuf, gtk2, cups, nspr, nss, libpng, libnotify
 , libgcrypt, systemd, fontconfig, dbus, expat, ffmpeg_3, curl, zlib, gnome3
-, at-spi2-atk
+, at-spi2-atk, at-spi2-core, apulse
 }:
 
 let
@@ -10,20 +10,22 @@ 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.0.96.181.gf6bc1b6b-12";
+  version = "1.1.10.546.ge08ef575-19";
   # 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 = "30";
+  rev = "36";
 
 
   deps = [
     alsaLib
+    apulse
     atk
     at-spi2-atk
+    at-spi2-core
     cairo
     cups
     curl
@@ -72,7 +74,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 = "859730fbc80067f0828f7e13eee9a21b13b749f897a50e17c2da4ee672785cfd79e1af6336e609529d105e040dc40f61b6189524783ac93d49f991c4ea8b3c56";
+    sha512 = "c49f1a86a9b737e64a475bbe62754a36f607669e908eb725a2395f0a0a6b95968e0c8ce27ab2c8b6c92fe8cbacb1ef58de11c79b92dc0f58c2c6d3a140706a1f";
   };
 
   buildInputs = [ squashfsTools makeWrapper ];
@@ -134,6 +136,8 @@ stdenv.mkDerivation {
       librarypath="${stdenv.lib.makeLibraryPath deps}:$libdir"
       wrapProgram $out/share/spotify/spotify \
         --prefix LD_LIBRARY_PATH : "$librarypath" \
+        --prefix LD_LIBRARY_PATH : "${apulse}/lib/apulse" \
+        --set APULSE_PLAYBACK_DEVICE plug:dmix \
         --prefix PATH : "${gnome3.zenity}/bin"
 
       # fix Icon line in the desktop file (#48062)