diff options
author | Ivar Scholten <ivar.scholten@protonmail.com> | 2022-01-24 17:09:41 +0100 |
---|---|---|
committer | Ivar Scholten <ivar.scholten@protonmail.com> | 2022-01-24 17:09:41 +0100 |
commit | b3ca14d0fd7a5627ff70acba832d894f9c096079 (patch) | |
tree | 1e4367c6a0a17f78bae2101e0bb47f4d0bff65df /pkgs/applications/audio/ncspot | |
parent | d6e2f44abc6fbd71a167d297368bdba69aee1714 (diff) |
ncspot: 0.9.3 -> 0.9.5
Diffstat (limited to 'pkgs/applications/audio/ncspot')
-rw-r--r-- | pkgs/applications/audio/ncspot/default.nix | 18 | ||||
-rw-r--r-- | pkgs/applications/audio/ncspot/rust_1_57_support.patch | 21 |
2 files changed, 32 insertions, 7 deletions
diff --git a/pkgs/applications/audio/ncspot/default.nix b/pkgs/applications/audio/ncspot/default.nix index 6ba52306e8c47..fc7ab505ac2df 100644 --- a/pkgs/applications/audio/ncspot/default.nix +++ b/pkgs/applications/audio/ncspot/default.nix @@ -1,22 +1,26 @@ { stdenv, lib, fetchFromGitHub, rustPlatform, pkg-config, ncurses, openssl, libiconv -, withALSA ? true, alsa-lib ? null -, withPulseAudio ? false, libpulseaudio ? null -, withPortAudio ? false, portaudio ? null -, withMPRIS ? false, dbus ? null +, withALSA ? true, alsa-lib +, withPulseAudio ? false, libpulseaudio +, withPortAudio ? false, portaudio +, withMPRIS ? false, dbus }: rustPlatform.buildRustPackage rec { pname = "ncspot"; - version = "0.9.3"; + version = "0.9.5"; src = fetchFromGitHub { owner = "hrkfdn"; repo = "ncspot"; rev = "v${version}"; - sha256 = "sha256-k4EGyQjjJCvUhp56OjYl63n+giI05GiIS2++I1SVhCg="; + sha256 = "sha256-HnP0dXKkMssDAhrsA99bTCVGdov9t5+1y8fJ+BWTM80="; }; - cargoSha256 = "sha256-YsjInqmkPnAwqgRBDiwcLH0DDqCF0NElrn+WO2v+ATM="; + # Upstream now only supports rust 1.58+, but this version is not yet available in nixpkgs. + # See https://github.com/hrkfdn/ncspot/issues/714 + patches = [ ./rust_1_57_support.patch ]; + + cargoSha256 = "sha256-g6UMwirsSV+/NtFIfEZrz5h/OitPQcDeSawh7wq4TLI="; nativeBuildInputs = [ pkg-config ]; diff --git a/pkgs/applications/audio/ncspot/rust_1_57_support.patch b/pkgs/applications/audio/ncspot/rust_1_57_support.patch new file mode 100644 index 0000000000000..ce4d473989c31 --- /dev/null +++ b/pkgs/applications/audio/ncspot/rust_1_57_support.patch @@ -0,0 +1,21 @@ +diff --git a/src/ui/listview.rs b/src/ui/listview.rs +index 17fead7..e6c72b6 100644 +--- a/src/ui/listview.rs ++++ b/src/ui/listview.rs +@@ -85,7 +85,7 @@ impl<I: ListItem> ListView<I> { + + pub fn content_height_with_paginator(&self) -> usize { + let content_len = self.content.read().unwrap().len(); +- log::info!("content len: {content_len}"); ++ log::info!("content len: {}", content_len); + + // add 1 more row for paginator if we can paginate + if self.can_paginate() { +@@ -97,7 +97,7 @@ impl<I: ListItem> ListView<I> { + + fn can_paginate(&self) -> bool { + let loaded = self.get_pagination().loaded_content(); +- log::info!("can paginate: {loaded}"); ++ log::info!("can paginate: {}", loaded); + self.get_pagination().max_content().unwrap_or(0) > self.get_pagination().loaded_content() + } |