anchor.diff:  { stdenv, fetchurl, libspotify, alsaLib, readline, pkgconfig, apiKey, unzip, gnused }:
   
  -let version = "12.1.51"; in
  +let 
  +  version = "12.1.51"; 
  +  isLinux = (stdenv.system == "x86_64-linux" || stdenv.system == "i686-linux");
  +in
   
  -if (stdenv.system != "x86_64-linux" && stdenv.system != "x86_64-darwin")
  +if (stdenv.system != "x86_64-linux" && stdenv.system != "x86_64-darwin" && stdenv.system != "i686-linux")
   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}";
  
positive.code:   buildInputs = stdenv.lib.optional (stdenv.system == "x86_64-darwin") unzip;
  
    # linux-specific
    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";
  
    passthru = {
  
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
  