anchor.diff:    # common
     buildPhase = "true";
     # no patch or build phase for darwin
  -  phases = [ "unpackPhase" "installPhase" ]
  -    ++ stdenv.lib.optionals (stdenv.system == "x86_64-linux")
  -      [ "patchPhase" "buildPhase" ];
  +  phases = 
  +    [ "unpackPhase" ] ++ 
  +    (stdenv.lib.optionals (stdenv.system == "x86_64-linux") [ "patchPhase" "buildPhase" ]) ++
  +    [ "installPhase" ];
     installPhase = if (stdenv.system == "x86_64-linux")
       then "installPhase"
       else ''
  
positive.code: { stdenv, fetchurl, libspotify, alsaLib, readline, pkgconfig, apiKey, unzip }:
  
  let version = "12.1.51"; in
  
  if (stdenv.system == "x86_64-linux" && stdenv.system != "x86_64-darwin")
  then throw "Check https://developer.spotify.com/technologies/libspotify/ for a tarball for your system and add it here"
  else stdenv.mkDerivation {
    name = "libspotify-${version}";
  
negative.code:   installFlags = stdenv.lib.optionalString (stdenv.system == "x86_64-linux")
      "prefix=$(out)";
    patchPhase = stdenv.lib.optionalString (stdenv.system == "x86_64-linux")
      "${gnused}/bin/sed -i 's/ldconfig//' Makefile";
    postInstall = stdenv.lib.optionalString (stdenv.system == "x86_64-linux")
      "mv -v share $out";
  
  