nixpkgs/pkgs/applications/audio/termusic/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1.1 KiB
Nix
Raw Normal View History

2022-02-18 16:17:18 +00:00
{ lib
, stdenv
, rustPlatform
2023-02-24 14:15:58 +00:00
, fetchCrate
, fetchpatch
2022-02-18 16:17:18 +00:00
, pkg-config
2023-02-24 14:15:58 +00:00
, alsa-lib
, darwin
}:
2022-02-18 16:17:18 +00:00
rustPlatform.buildRustPackage rec {
pname = "termusic";
2023-02-24 14:15:58 +00:00
version = "0.7.9";
2022-02-18 16:17:18 +00:00
src = fetchCrate {
inherit pname version;
2023-02-24 14:15:58 +00:00
hash = "sha256-ytAKINcZwLyHWbzShxfxRKx4BepM0G2BYdLgwR48g7w=";
2022-02-18 16:17:18 +00:00
};
2023-02-24 14:15:58 +00:00
cargoHash = "sha256-yxFF5Yqj+xTB3FAJUtgcIeAEHR44JA1xONxGFdG0yS0=";
patches = [
(fetchpatch {
name = "fix-panic-when-XDG_AUDIO_DIR-not-set.patch";
url = "https://github.com/tramhao/termusic/commit/b6006b22901f1f865a2e3acf7490fd3fa520ca5e.patch";
hash = "sha256-1ukQ0y5IRdOndsryuqXI9/zyhCDQ5NIeTan4KCynAv0=";
})
];
nativeBuildInputs = [
pkg-config
rustPlatform.bindgenHook
];
2022-02-18 16:17:18 +00:00
2023-02-24 14:15:58 +00:00
buildInputs = lib.optionals stdenv.isLinux [
alsa-lib
] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.AudioUnit
];
2022-02-18 16:17:18 +00:00
meta = with lib; {
description = "Terminal Music Player TUI written in Rust";
homepage = "https://github.com/tramhao/termusic";
license = with licenses; [ gpl3Only ];
maintainers = with maintainers; [ devhell ];
};
}