diff --git a/pkgs/applications/audio/termusic/default.nix b/pkgs/applications/audio/termusic/default.nix index c36240558b72..c6048ed1e7fe 100644 --- a/pkgs/applications/audio/termusic/default.nix +++ b/pkgs/applications/audio/termusic/default.nix @@ -6,11 +6,13 @@ , dbus , Foundation , fetchFromGitHub +, fetchpatch , glib , gst_all_1 , IOKit , lib , MediaPlayer +, mpv-unwrapped , openssl , pkg-config , protobuf @@ -22,26 +24,42 @@ rustPlatform.buildRustPackage rec { pname = "termusic"; - version = "0.9.0"; + version = "0.9.1"; src = fetchFromGitHub { owner = "tramhao"; repo = "termusic"; rev = "v${version}"; - hash = "sha256-FOFZg32hrWpKVsjkMDkiqah7jmUZw0HRWGqOvsN0t8Q="; + hash = "sha256-aEkg1j6R86QGn21HBimtZwmjmW1K9Wo+67G4DlpY960="; }; + cargoPatches = [ + # both following patches can be removed with the follow up release to 0.9.1 as they are cherry-picked from `termusic/master` branch + # fix build issue with 0.9.1 release and vendoring producing wrong hash for soundtouch-ffi + (fetchpatch { + url = "https://github.com/tramhao/termusic/commit/211fc3fe008932d052d31d3b836e8a80eade3cfe.patch"; + hash = "sha256-11kSI28YonoTe5W31+R76lGhNiN1ZLAg94FrfYiZUAY="; + }) + # fix a bug through previous patch + (fetchpatch { + url = "https://github.com/tramhao/termusic/commit/2a40b2f366dfa5c1f008c79a3ff5c1bbf53fe10f.patch"; + hash = "sha256-b7CJ5SqxrU1Jr4GDaJe9sFutDHMqIQxGhXbBFGB6y84="; + }) + ]; + postPatch = '' pushd $cargoDepsCopy/stream-download oldHash=$(sha256sum src/lib.rs | cut -d " " -f 1) substituteInPlace $cargoDepsCopy/stream-download/src/lib.rs \ --replace-warn '#![doc = include_str!("../README.md")]' "" substituteInPlace .cargo-checksum.json \ - --replace $oldHash $(sha256sum src/lib.rs | cut -d " " -f 1) + --replace-warn $oldHash $(sha256sum src/lib.rs | cut -d " " -f 1) popd ''; - cargoHash = "sha256-r5FOl3Bp3GYhOhvWj/y6FXsuG2wvuFcMcYKBzVBVqiM="; + cargoHash = "sha256-4PprZdTIcYa8y7FwQVrG0ZBg7N/Xe6HDt/z6ZmaHd5Y="; + + useNextest = true; nativeBuildInputs = [ pkg-config @@ -53,6 +71,7 @@ rustPlatform.buildRustPackage rec { dbus glib gst_all_1.gstreamer + mpv-unwrapped openssl sqlite ] ++ lib.optionals stdenv.isDarwin [