From f2806a09c49d74eb58a123a06f312067ae71fbc1 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Tue, 27 Sep 2016 13:47:48 -0500 Subject: [PATCH] spotify: unpack into temporary directory to fix output permissions --- pkgs/applications/audio/spotify/default.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/audio/spotify/default.nix b/pkgs/applications/audio/spotify/default.nix index 23336e1c5ac..0cc0740eddb 100644 --- a/pkgs/applications/audio/spotify/default.nix +++ b/pkgs/applications/audio/spotify/default.nix @@ -56,15 +56,22 @@ stdenv.mkDerivation { buildInputs = [ dpkg makeWrapper ]; - unpackPhase = "true"; + unpackPhase = '' + runHook preUnpack + dpkg-deb -x $src . + runHook postUnpack + ''; + + configurePhase = "runHook preConfigure; runHook postConfigure"; + buildPhase = "runHook preBuild; runHook postBuild"; installPhase = '' + runHook preInstall + libdir=$out/lib/spotify mkdir -p $libdir - dpkg-deb -x $src $out - mv $out/usr/* $out/ - rm -rf $out/usr + mv ./usr/* $out/ # Work around Spotify referring to a specific minor version of # OpenSSL. @@ -96,6 +103,8 @@ stdenv.mkDerivation { ln -s "$out/share/spotify/icons/spotify-linux-$i.png" \ "$out/share/icons/hicolor/$ixi/apps/spotify-client.png" done + + runHook postInstall ''; dontStrip = true;