Files
nixpkgs/pkgs/by-name/li/libsidplayfp/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

112 lines
2.5 KiB
Nix

{
stdenv,
lib,
fetchFromGitHub,
makeFontsConf,
gitUpdater,
testers,
autoreconfHook,
docSupport ? true,
doxygen,
graphviz,
libexsid,
libgcrypt,
perl,
pkg-config,
xa,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libsidplayfp";
version = "2.15.1";
src = fetchFromGitHub {
owner = "libsidplayfp";
repo = "libsidplayfp";
tag = "v${finalAttrs.version}";
fetchSubmodules = true;
hash = "sha256-wnbQy0PHHpkgNm3SC7GZyxSAUYd5eexVY9Dg1oiCjRo=";
};
outputs = [ "out" ] ++ lib.optionals docSupport [ "doc" ];
postPatch = ''
patchShebangs .
'';
strictDeps = true;
nativeBuildInputs = [
autoreconfHook
perl
pkg-config
xa
]
++ lib.optionals docSupport [
doxygen
graphviz
];
buildInputs = [
libexsid
libgcrypt
];
enableParallelBuilding = true;
configureFlags = [
(lib.strings.enableFeature true "hardsid")
(lib.strings.withFeature true "gcrypt")
(lib.strings.withFeature true "exsid")
(lib.strings.enableFeature finalAttrs.finalPackage.doCheck "tests")
];
# Make Doxygen happy with the setup, reduce log noise
env.FONTCONFIG_FILE = lib.optionalString docSupport (makeFontsConf {
fontDirectories = [ ];
});
preBuild = ''
# Reduce noise from fontconfig during doc building
export XDG_CACHE_HOME=$TMPDIR
'';
buildFlags = [ "all" ] ++ lib.optionals docSupport [ "doc" ];
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
postInstall = lib.optionalString docSupport ''
mkdir -p $doc/share/doc/libsidplayfp
mv docs/html $doc/share/doc/libsidplayfp/
'';
passthru = {
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
updateScript = gitUpdater {
rev-prefix = "v";
};
};
meta = {
description = "Library to play Commodore 64 music derived from libsidplay2";
longDescription = ''
libsidplayfp is a C64 music player library which integrates
the reSID SID chip emulation into a cycle-based emulator
environment, constantly aiming to improve emulation of the
C64 system and the SID chips.
'';
homepage = "https://github.com/libsidplayfp/libsidplayfp";
changelog = "https://github.com/libsidplayfp/libsidplayfp/releases/tag/v${finalAttrs.version}";
license = with lib.licenses; [ gpl2Plus ];
maintainers = with lib.maintainers; [
ramkromberg
OPNA2608
];
platforms = lib.platforms.all;
pkgConfigModules = [
"libsidplayfp"
"libstilview"
];
};
})