pytrainer: unpin python 3.10
[NixPkgs.git] / pkgs / by-name / mp / mpc / package.nix
blob2d19761231670223c92ed62700ce8dfe95832f05
2   lib,
3   fetchFromGitHub,
4   installShellFiles,
5   libiconv,
6   libmpdclient,
7   meson,
8   ninja,
9   pkg-config,
10   python3Packages,
11   stdenv,
14 stdenv.mkDerivation (finalAttrs: {
15   pname = "mpc";
16   version = "0.35";
18   src = fetchFromGitHub {
19     owner = "MusicPlayerDaemon";
20     repo = "mpc";
21     rev = "v${finalAttrs.version}";
22     hash = "sha256-oVdnj3nsYvOHcIOgoamLamriuWu9lucWUQtxVmXZabs=";
23   };
25   buildInputs = [
26     libmpdclient
27   ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
29   nativeBuildInputs = [
30     installShellFiles
31     meson
32     ninja
33     pkg-config
34     python3Packages.sphinx
35   ];
37   postInstall = ''
38     installShellCompletion --cmd mpc --bash $out/share/doc/mpc/contrib/mpc-completion.bash
39   '';
41   postFixup = ''
42     rm $out/share/doc/mpc/contrib/mpc-completion.bash
43   '';
45   meta = {
46     homepage = "https://www.musicpd.org/clients/mpc/";
47     description = "Minimalist command line interface to MPD";
48     changelog = "https://raw.githubusercontent.com/MusicPlayerDaemon/mpc/refs/heads/master/NEWS";
49     license = lib.licenses.gpl2Plus;
50     mainProgram = "mpc";
51     maintainers = with lib.maintainers; [ AndersonTorres ];
52     platforms = lib.platforms.unix;
53   };