about summary refs log tree commit diff
path: root/pkgs/applications/audio/librespot
diff options
context:
space:
mode:
authorfigsoda <figsoda@pm.me>2021-11-15 19:06:51 -0500
committerfigsoda <figsoda@pm.me>2021-11-16 08:11:48 -0500
commitce0da1b87157e4488f9d8f0c1203b54441b3022a (patch)
tree3ad251102fd3bc9316bcc1a5c54d188379e4e8b4 /pkgs/applications/audio/librespot
parent9ed4b5c96180ef34832c09085df16da3f3182340 (diff)
librespot: use buildFeatures
Diffstat (limited to 'pkgs/applications/audio/librespot')
-rw-r--r--pkgs/applications/audio/librespot/default.nix18
1 files changed, 6 insertions, 12 deletions
diff --git a/pkgs/applications/audio/librespot/default.nix b/pkgs/applications/audio/librespot/default.nix
index 7b7d811f57313..64d59516f87f1 100644
--- a/pkgs/applications/audio/librespot/default.nix
+++ b/pkgs/applications/audio/librespot/default.nix
@@ -15,24 +15,18 @@ rustPlatform.buildRustPackage rec {
 
   cargoSha256 = "1sal85gsbnrabxi39298w9njdc08csnwl40akd6k9fsc0fmpn1b0";
 
-  cargoBuildFlags = with lib; [
-    "--no-default-features"
-    "--features"
-    (concatStringsSep "," (filter (x: x != "") [
-      (optionalString withRodio "rodio-backend")
-      (optionalString withALSA "alsa-backend")
-      (optionalString withPulseAudio "pulseaudio-backend")
-      (optionalString withPortAudio "portaudio-backend")
-
-    ]))
-  ];
-
   nativeBuildInputs = [ pkg-config ];
 
   buildInputs = [ openssl ] ++ lib.optional withALSA alsa-lib
     ++ lib.optional withPulseAudio libpulseaudio
     ++ lib.optional withPortAudio portaudio;
 
+  buildNoDefaultFeatures = true;
+  buildFeatures = lib.optional withRodio "rodio-backend"
+    ++ lib.optional withALSA "alsa-backend"
+    ++ lib.optional withPulseAudio "pulseaudio-backend"
+    ++ lib.optional withPortAudio "portaudio-backend";
+
   doCheck = false;
 
   meta = with lib; {