nixos/kubernetes/kubelet: Fix sandbox image load on containerd 2.x (#364558)
[NixPkgs.git] / pkgs / applications / audio / listenbrainz-mpd / default.nix
blob9b3683a9f0919e9e48b41ad98c177a4b284f1277
2   lib,
3   rustPlatform,
4   fetchFromGitea,
5   pkg-config,
6   stdenv,
7   openssl,
8   libiconv,
9   sqlite,
10   Security,
11   SystemConfiguration,
12   CoreFoundation,
13   installShellFiles,
14   asciidoctor,
17 rustPlatform.buildRustPackage rec {
18   pname = "listenbrainz-mpd";
19   version = "2.3.8";
21   src = fetchFromGitea {
22     domain = "codeberg.org";
23     owner = "elomatreb";
24     repo = "listenbrainz-mpd";
25     rev = "v${version}";
26     hash = "sha256-QBc0avci232UIxzTKlS0pjL7cCuvwAFgw6dSwdtYAtU=";
27   };
29   cargoHash = "sha256-jnDS9tIJ387A2P9oUSYB3tXrXjwwVmQ26erIIlHBkao=";
31   nativeBuildInputs = [
32     pkg-config
33     installShellFiles
34     asciidoctor
35   ];
37   buildInputs =
38     [ sqlite ]
39     ++ (
40       if stdenv.hostPlatform.isDarwin then
41         [
42           libiconv
43           Security
44           SystemConfiguration
45           CoreFoundation
46         ]
47       else
48         [
49           openssl
50         ]
51     );
53   buildFeatures =
54     [
55       "shell_completion"
56     ]
57     ++ lib.optionals stdenv.hostPlatform.isLinux [
58       "systemd"
59     ];
61   postInstall = ''
62     installShellCompletion \
63       --bash generated_completions/listenbrainz-mpd.bash \
64       --fish generated_completions/listenbrainz-mpd.fish \
65       --zsh generated_completions/_listenbrainz-mpd
67     asciidoctor --backend=manpage listenbrainz-mpd.adoc -o listenbrainz-mpd.1
68     installManPage listenbrainz-mpd.1
69   '';
71   meta = with lib; {
72     homepage = "https://codeberg.org/elomatreb/listenbrainz-mpd";
73     changelog = "https://codeberg.org/elomatreb/listenbrainz-mpd/src/tag/v${version}/CHANGELOG.md";
74     description = "ListenBrainz submission client for MPD";
75     license = licenses.agpl3Only;
76     maintainers = with maintainers; [ DeeUnderscore ];
77     mainProgram = "listenbrainz-mpd";
78   };