25 rustPlatform.buildRustPackage rec {
29 src = fetchFromGitHub {
33 hash = "sha256-aEkg1j6R86QGn21HBimtZwmjmW1K9Wo+67G4DlpY960=";
37 # both following patches can be removed with the follow up release to 0.9.1 as they are cherry-picked from `termusic/master` branch
38 # fix build issue with 0.9.1 release and vendoring producing wrong hash for soundtouch-ffi
40 url = "https://github.com/tramhao/termusic/commit/211fc3fe008932d052d31d3b836e8a80eade3cfe.patch";
41 hash = "sha256-11kSI28YonoTe5W31+R76lGhNiN1ZLAg94FrfYiZUAY=";
43 # fix a bug through previous patch
45 url = "https://github.com/tramhao/termusic/commit/2a40b2f366dfa5c1f008c79a3ff5c1bbf53fe10f.patch";
46 hash = "sha256-b7CJ5SqxrU1Jr4GDaJe9sFutDHMqIQxGhXbBFGB6y84=";
51 pushd $cargoDepsCopy/stream-download
52 oldHash=$(sha256sum src/lib.rs | cut -d " " -f 1)
53 substituteInPlace $cargoDepsCopy/stream-download/src/lib.rs \
54 --replace-warn '#![doc = include_str!("../README.md")]' ""
55 substituteInPlace .cargo-checksum.json \
56 --replace-warn $oldHash $(sha256sum src/lib.rs | cut -d " " -f 1)
60 cargoHash = "sha256-4PprZdTIcYa8y7FwQVrG0ZBg7N/Xe6HDt/z6ZmaHd5Y=";
67 rustPlatform.bindgenHook
79 ++ lib.optionals stdenv.hostPlatform.isDarwin [
88 ++ lib.optionals stdenv.hostPlatform.isLinux [
93 description = "Terminal Music Player TUI written in Rust";
94 homepage = "https://github.com/tramhao/termusic";
95 license = with lib.licenses; [ gpl3Only ];
96 maintainers = with lib.maintainers; [ devhell ];
97 mainProgram = "termusic";