Files
nixpkgs/pkgs/by-name/ke/kew/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

110 lines
2.1 KiB
Nix

{
config,
lib,
stdenv,
alsa-lib,
autoPatchelfHook,
chafa,
curl,
faad2,
fetchFromGitHub,
fftwFloat,
glib,
libogg,
libopus,
libjack2,
libpulseaudio,
libvorbis,
nix-update-script,
opusfile,
pkg-config,
taglib,
versionCheckHook,
withALSA ? stdenv.hostPlatform.isLinux,
withJACK ? false,
withPulseaudio ? config.pulseaudio or stdenv.hostPlatform.isLinux,
}:
let
uppercaseFirst =
x: (lib.toUpper (lib.substring 0 1 x)) + (lib.substring 1 ((lib.strings.stringLength x) - 1) x);
in
stdenv.mkDerivation (finalAttrs: {
pname = "kew";
version = "3.4.1";
src = fetchFromGitHub {
owner = "ravachol";
repo = "kew";
tag = "v${finalAttrs.version}";
hash = "sha256-WJxSE3b/VYqDtmRkQhUfGaY7A9zQxUIgy4PswpVzDmU=";
};
postPatch = ''
substituteInPlace Makefile \
--replace-fail '$(shell uname -s)' '${uppercaseFirst stdenv.hostPlatform.parsed.kernel.name}' \
--replace-fail '$(shell uname -m)' '${stdenv.hostPlatform.parsed.cpu.name}'
'';
nativeBuildInputs = [
pkg-config
]
++ lib.optionals stdenv.hostPlatform.isLinux [
autoPatchelfHook
];
buildInputs = [
fftwFloat.dev
chafa
curl.dev
glib.dev
libopus
opusfile
libvorbis
taglib
faad2
libogg
];
runtimeDependencies =
lib.optionals withPulseaudio [
libpulseaudio
]
++ lib.optionals (withALSA || withJACK) [
alsa-lib
]
++ lib.optionals withJACK [
libjack2
];
enableParallelBuilding = true;
installFlags = [
"MAN_DIR=${placeholder "out"}/share/man"
"PREFIX=${placeholder "out"}"
];
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Command-line music player for Linux";
homepage = "https://github.com/ravachol/kew";
platforms = lib.platforms.unix;
license = lib.licenses.gpl2Only;
maintainers = with lib.maintainers; [
demine
matteopacini
];
mainProgram = "kew";
};
})