@ -1,8 +1,8 @@
{ stdenv , fetchurl , libspotify , alsaLib , readline , pkgconfig , apiKey , unzip }:
{ stdenv , fetchurl , libspotify , alsaLib , readline , pkgconfig , apiKey , unzip , gnused }:
let version = " 1 2 . 1 . 5 1 " ; in
if ( stdenv . system = = " x 8 6 _ 6 4 - l i n u x " && stdenv . system != " x 8 6 _ 6 4 - d a r w i n " )
if ( stdenv . system ! = " x 8 6 _ 6 4 - l i n u x " && stdenv . system != " x 8 6 _ 6 4 - d a r w i n " )
then throw " C h e c k h t t p s : / / d e v e l o p e r . s p o t i f y . c o m / t e c h n o l o g i e s / l i b s p o t i f y / f o r a t a r b a l l f o r y o u r s y s t e m a n d a d d i t h e r e "
else stdenv . mkDerivation {
name = " l i b s p o t i f y - ${ version } " ;
@ -24,9 +24,10 @@ else stdenv.mkDerivation {
# common
buildPhase = " t r u e " ;
# no patch or build phase for darwin
phases = [ " u n p a c k P h a s e " " i n s t a l l P h a s e " ]
++ stdenv . lib . optionals ( stdenv . system == " x 8 6 _ 6 4 - l i n u x " )
[ " p a t c h P h a s e " " b u i l d P h a s e " ] ;
phases =
[ " u n p a c k P h a s e " ] ++
( stdenv . lib . optionals ( stdenv . system == " x 8 6 _ 6 4 - l i n u x " ) [ " p a t c h P h a s e " " b u i l d P h a s e " ] ) ++
[ " i n s t a l l P h a s e " ] ;
installPhase = if ( stdenv . system == " x 8 6 _ 6 4 - l i n u x " )
then " i n s t a l l P h a s e "
else ''
@ -48,7 +49,7 @@ else stdenv.mkDerivation {
installFlags = stdenv . lib . optionalString ( stdenv . system == " x 8 6 _ 6 4 - l i n u x " )
" p r e f i x = $ ( o u t ) " ;
patchPhase = stdenv . lib . optionalString ( stdenv . system == " x 8 6 _ 6 4 - l i n u x " )
" se d - i ' s / l d c o n f i g / / ' M a k e f i l e " ;
" ${ gnused } / b i n / se d - i ' s / l d c o n f i g / / ' M a k e f i l e " ;
postInstall = stdenv . lib . optionalString ( stdenv . system == " x 8 6 _ 6 4 - l i n u x " )
" m v - v s h a r e $ o u t " ;