summary refs log tree commit diff
path: root/pkgs/development/libraries/libspotify
diff options
context:
space:
mode:
authorRickard Nilsson <rickynils@gmail.com>2013-07-22 16:28:33 +0200
committerRickard Nilsson <rickynils@gmail.com>2013-07-22 16:31:38 +0200
commit3fa913d5ec035c2eedfc52e5753b355c22c2a745 (patch)
tree224072a41dd98d1338b8635425d16a61c18b081d /pkgs/development/libraries/libspotify
parenta321f6f3027bde8df2dee8280f08e1e9b726666f (diff)
downloadnixpkgs-3fa913d5ec035c2eedfc52e5753b355c22c2a745.tar
nixpkgs-3fa913d5ec035c2eedfc52e5753b355c22c2a745.tar.gz
nixpkgs-3fa913d5ec035c2eedfc52e5753b355c22c2a745.tar.bz2
nixpkgs-3fa913d5ec035c2eedfc52e5753b355c22c2a745.tar.lz
nixpkgs-3fa913d5ec035c2eedfc52e5753b355c22c2a745.tar.xz
nixpkgs-3fa913d5ec035c2eedfc52e5753b355c22c2a745.tar.zst
nixpkgs-3fa913d5ec035c2eedfc52e5753b355c22c2a745.zip
libspotify: Fix build for linux.
For Linux, the phases was run in the wrong order. I've
fixed that, but the package is still a complete mess that
needs to be cleaned up. The linux and darwin builds should
probably be separated into two different Nix expressions
to avoid the current conditional mess.
Diffstat (limited to 'pkgs/development/libraries/libspotify')
-rw-r--r--pkgs/development/libraries/libspotify/default.nix13
1 files changed, 7 insertions, 6 deletions
diff --git a/pkgs/development/libraries/libspotify/default.nix b/pkgs/development/libraries/libspotify/default.nix
index 86007920d0e..000112008a3 100644
--- a/pkgs/development/libraries/libspotify/default.nix
+++ b/pkgs/development/libraries/libspotify/default.nix
@@ -1,8 +1,8 @@
-{ stdenv, fetchurl, libspotify, alsaLib, readline, pkgconfig, apiKey, unzip }:
+{ stdenv, fetchurl, libspotify, alsaLib, readline, pkgconfig, apiKey, unzip, gnused }:
 
 let version = "12.1.51"; in
 
-if (stdenv.system == "x86_64-linux" && stdenv.system != "x86_64-darwin")
+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}";
@@ -24,9 +24,10 @@ else stdenv.mkDerivation {
   # 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 ''
@@ -48,7 +49,7 @@ else stdenv.mkDerivation {
   installFlags = stdenv.lib.optionalString (stdenv.system == "x86_64-linux")
     "prefix=$(out)";
   patchPhase = stdenv.lib.optionalString (stdenv.system == "x86_64-linux")
-    "sed -i 's/ldconfig//' Makefile";
+    "${gnused}/bin/sed -i 's/ldconfig//' Makefile";
   postInstall = stdenv.lib.optionalString (stdenv.system == "x86_64-linux")
     "mv -v share $out";