btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / rm / rmpc / package.nix
blobed25639833e2e93276a2e3d039231662173e83b0
2   lib,
3   rustPlatform,
4   fetchFromGitHub,
5   installShellFiles,
6   pkg-config,
7   cmake,
8 }:
10 rustPlatform.buildRustPackage rec {
11   pname = "rmpc";
12   version = "0.6.0";
14   src = fetchFromGitHub {
15     owner = "mierak";
16     repo = "rmpc";
17     rev = "v${version}";
18     hash = "sha256-hQhcNeGNxUxJ9hO/ukmt6V8V8zQHQLvejeu692pKTwg=";
19   };
21   cargoHash = "sha256-Y+NmBAcp6lu1dmMo1Gpozmm/YvNYM7mUAvU2C7iO0ew=";
23   nativeBuildInputs = [
24     installShellFiles
25     pkg-config
26     cmake
27   ];
29   env.VERGEN_GIT_DESCRIBE = version;
31   postInstall = ''
32     installManPage target/man/rmpc.1
34     installShellCompletion --cmd rmpc \
35       --bash target/completions/rmpc.bash \
36       --fish target/completions/rmpc.fish \
37       --zsh target/completions/_rmpc
38   '';
40   meta = {
41     changelog = "https://github.com/mierak/rmpc/releases/tag/${src.rev}";
42     description = "TUI music player client for MPD with album art support via kitty image protocol";
43     homepage = "https://mierak.github.io/rmpc/";
44     license = lib.licenses.bsd3;
45     longDescription = ''
46       Rusty Music Player Client is a beautiful, modern and configurable terminal-based Music Player
47       Daemon client. It was inspired by ncmpcpp and aims to provide an alternative with support for
48       album art through kitty image protocol without any ugly hacks. It also features ranger/lf
49       inspired browsing of songs and other goodies.
50     '';
51     maintainers = with lib.maintainers; [
52       donovanglover
53       bloxx12
54     ];
55     mainProgram = "rmpc";
56     platforms = lib.platforms.linux;
57   };