Files
nixpkgs/pkgs/by-name/mp/mpc123/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

62 lines
1.2 KiB
Nix

{
lib,
stdenv,
fetchFromGitLab,
gettext,
libao,
libmpcdec,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "mpc123";
version = "0.2.4";
src = fetchFromGitLab {
domain = "salsa.debian.org";
owner = "debian";
repo = "mpc123";
rev = "upstream/${finalAttrs.version}";
hash = "sha256-+/yxb19CJzyjQmT3O21pEmPR5YudmyCxWwo+W3uOB9Q=";
};
strictDeps = true;
nativeBuildInputs = [
gettext
];
buildInputs = [
gettext
libao
libmpcdec
];
makeFlags = [
"CC=${stdenv.cc.targetPrefix}cc"
];
# Workaround build failure on -fno-common toolchains like upstream
# gcc-10. Otherwise build fails as:
# ld: /build/cc566Cj9.o:(.bss+0x0): multiple definition of `mpc123_file_reader'; ao.o:(.bss+0x40): first defined here
env.NIX_CFLAGS_COMPILE = "-fcommon";
# XXX: Should install locales too (though there's only 1 available).
installPhase = ''
runHook preInstall
mkdir -p "$out/bin"
cp -v mpc123 "$out/bin"
runHook postInstall
'';
meta = {
description = "Musepack (.mpc) audio player";
homepage = "https://github.com/bucciarati/mpc123";
license = lib.licenses.gpl2Plus;
mainProgram = "mpc123";
maintainers = [ ];
platforms = lib.platforms.unix;
};
})