anchor.diff:        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)
  
positive.code:   # 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.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 = "36";
  
  
    deps = [
      alsaLib
      apulse
      atk
      at-spi2-atk
      at-spi2-core
      cairo
      cups
      curl
  
negative.code:   # 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";
    };
  
    buildInputs = [ squashfsTools makeWrapper ];
  