anchor.diff:    buildInputs = stdenv.lib.optional (stdenv.system == "x86_64-darwin") unzip;
   
     # linux-specific
  -  installFlags = stdenv.lib.optionalString (stdenv.system == "x86_64-linux")
  +  installFlags = stdenv.lib.optionalString (isLinux)
       "prefix=$(out)";
  -  patchPhase = stdenv.lib.optionalString (stdenv.system == "x86_64-linux")
  +  patchPhase = stdenv.lib.optionalString (isLinux)
       "${gnused}/bin/sed -i 's/ldconfig//' Makefile";
  -  postInstall = stdenv.lib.optionalString (stdenv.system == "x86_64-linux")
  +  postInstall = stdenv.lib.optionalString (isLinux)
       "mv -v share $out";
   
     passthru = {
  
positive.code:         url    = "https://developer.spotify.com/download/libspotify/libspotify-${version}-Darwin-universal.zip";
          sha256 = "1gcgrc8arim3hnszcc886lmcdb4iigc08abkaa02l6gng43ky1c0";
        }
      else
        null;
  
  
negative.code:   # no patch or build phase for darwin
    phases = 
      [ "unpackPhase" ] ++ 
      (stdenv.lib.optionals (isLinux) [ "patchPhase" "buildPhase" ]) ++
      [ "installPhase" ];
    installPhase = if (isLinux)
      then "installPhase"
      else ''
        mkdir -p "$out"/include/libspotify
  