mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 16:43:58 +00:00
57 lines
1.3 KiB
Nix
57 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
libiconv,
|
|
libmpdclient,
|
|
meson,
|
|
ninja,
|
|
pkg-config,
|
|
python3Packages,
|
|
stdenv,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "mpc";
|
|
version = "0.35";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "MusicPlayerDaemon";
|
|
repo = "mpc";
|
|
rev = "v${finalAttrs.version}";
|
|
hash = "sha256-oVdnj3nsYvOHcIOgoamLamriuWu9lucWUQtxVmXZabs=";
|
|
};
|
|
|
|
buildInputs = [
|
|
libmpdclient
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
meson
|
|
ninja
|
|
pkg-config
|
|
python3Packages.sphinx
|
|
];
|
|
|
|
env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { NIX_LDFLAGS = "-liconv"; };
|
|
|
|
postInstall = ''
|
|
installShellCompletion --cmd mpc --bash $out/share/doc/mpc/contrib/mpc-completion.bash
|
|
'';
|
|
|
|
postFixup = ''
|
|
rm $out/share/doc/mpc/contrib/mpc-completion.bash
|
|
'';
|
|
|
|
meta = {
|
|
homepage = "https://www.musicpd.org/clients/mpc/";
|
|
description = "Minimalist command line interface to MPD";
|
|
changelog = "https://raw.githubusercontent.com/MusicPlayerDaemon/mpc/refs/heads/master/NEWS";
|
|
license = lib.licenses.gpl2Plus;
|
|
mainProgram = "mpc";
|
|
maintainers = with lib.maintainers; [ AndersonTorres ];
|
|
platforms = lib.platforms.unix;
|
|
};
|
|
})
|