From 007c379becf8001728d56dd9bb45ac32194bb316 Mon Sep 17 00:00:00 2001 From: figsoda Date: Tue, 26 Oct 2021 22:43:09 -0400 Subject: ncspot: use buildFeatures --- pkgs/applications/audio/ncspot/default.nix | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'pkgs/applications/audio/ncspot') 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; { -- cgit 1.4.1