diff options
author | fortuneteller2k <lythe1107@gmail.com> | 2023-04-09 13:07:30 +0800 |
---|---|---|
committer | fortuneteller2k <lythe1107@gmail.com> | 2023-04-09 13:07:30 +0800 |
commit | 88aded71bb383c2fadcb621d5574ce629fccacb7 (patch) | |
tree | ecddbe6c58bd45f8cbf90611d15e00c961caa2c4 /pkgs/applications/audio/ncspot | |
parent | dc73bd6430dc594655488337944b64a9841bf8d8 (diff) |
ncspot: add extra features
Diffstat (limited to 'pkgs/applications/audio/ncspot')
-rw-r--r-- | pkgs/applications/audio/ncspot/default.nix | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/pkgs/applications/audio/ncspot/default.nix b/pkgs/applications/audio/ncspot/default.nix index 23637fc8b4102..8609912456b5b 100644 --- a/pkgs/applications/audio/ncspot/default.nix +++ b/pkgs/applications/audio/ncspot/default.nix @@ -1,8 +1,17 @@ -{ stdenv, lib, fetchFromGitHub, rustPlatform, pkg-config, ncurses, openssl +{ stdenv +, lib +, fetchFromGitHub +, rustPlatform +, pkg-config +, ncurses +, openssl +, Cocoa , withALSA ? true, alsa-lib +, withClipboard ? true, libxcb, python3 +, withCover ? false, ueberzug , withPulseAudio ? false, libpulseaudio , withPortAudio ? false, portaudio -, withMPRIS ? false, dbus +, withMPRIS ? true, withNotify ? true, dbus }: rustPlatform.buildRustPackage rec { @@ -18,23 +27,31 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-tEk7BxAN8jEquJiv89vC0lYrB/sKeZhThBzs09A9NpA="; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ pkg-config ] + ++ lib.optional withClipboard python3; buildInputs = [ ncurses ] ++ lib.optional stdenv.isLinux openssl ++ lib.optional withALSA alsa-lib + ++ lib.optional withClipboard libxcb + ++ lib.optional withCover ueberzug ++ lib.optional withPulseAudio libpulseaudio ++ lib.optional withPortAudio portaudio - ++ lib.optional withMPRIS dbus; + ++ lib.optional (withMPRIS || withNotify) dbus + ++ lib.optional stdenv.isDarwin Cocoa; + + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-DNCURSES_UNCTRL_H_incl"; buildNoDefaultFeatures = true; + buildFeatures = [ "cursive/pancurses-backend" ] ++ lib.optional withALSA "alsa_backend" + ++ lib.optional withClipboard "share_clipboard" + ++ lib.optional withCover "cover" ++ lib.optional withPulseAudio "pulseaudio_backend" ++ lib.optional withPortAudio "portaudio_backend" - ++ lib.optional withMPRIS "mpris"; - - doCheck = false; + ++ lib.optional withMPRIS "mpris" + ++ lib.optional withNotify "notify"; meta = with lib; { description = "Cross-platform ncurses Spotify client written in Rust, inspired by ncmpc and the likes"; |