about summary refs log tree commit diff
path: root/pkgs/applications/audio/ncspot
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/audio/ncspot')
-rw-r--r--pkgs/applications/audio/ncspot/default.nix16
1 files changed, 7 insertions, 9 deletions
diff --git a/pkgs/applications/audio/ncspot/default.nix b/pkgs/applications/audio/ncspot/default.nix
index d37cec15ffcb..29a244f19d7a 100644
--- a/pkgs/applications/audio/ncspot/default.nix
+++ b/pkgs/applications/audio/ncspot/default.nix
@@ -5,13 +5,6 @@
 , withMPRIS ? false, dbus ? null
 }:
 
-let
-  features = [ "cursive/pancurses-backend" ]
-    ++ lib.optional withALSA "alsa_backend"
-    ++ lib.optional withPulseAudio "pulseaudio_backend"
-    ++ lib.optional withPortAudio "portaudio_backend"
-    ++ lib.optional withMPRIS "mpris";
-in
 rustPlatform.buildRustPackage rec {
   pname = "ncspot";
   version = "0.9.0";
@@ -25,8 +18,6 @@ rustPlatform.buildRustPackage rec {
 
   cargoSha256 = "0sdbba32f56z2q7kha5fxw2f00hikbz9sf4zl4wfl2i9b13j7mj0";
 
-  cargoBuildFlags = [ "--no-default-features" "--features" "${lib.concatStringsSep "," features}" ];
-
   nativeBuildInputs = [ pkg-config ];
 
   buildInputs = [ ncurses openssl ]
@@ -36,6 +27,13 @@ rustPlatform.buildRustPackage rec {
     ++ lib.optional withPortAudio portaudio
     ++ lib.optional withMPRIS dbus;
 
+  buildNoDefaultFeatures = true;
+  buildFeatures = [ "cursive/pancurses-backend" ]
+    ++ lib.optional withALSA "alsa_backend"
+    ++ lib.optional withPulseAudio "pulseaudio_backend"
+    ++ lib.optional withPortAudio "portaudio_backend"
+    ++ lib.optional withMPRIS "mpris";
+
   doCheck = false;
 
   meta = with lib; {