2020-08-20 17:08:02 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2021-04-17 00:35:05 +00:00
|
|
|
, fetchFromGitHub
|
2021-06-28 23:13:55 +00:00
|
|
|
, nix-update-script
|
2021-04-17 00:35:05 +00:00
|
|
|
, autoreconfHook
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2021-04-17 00:35:05 +00:00
|
|
|
, perl
|
|
|
|
, unittest-cpp
|
|
|
|
, xa
|
|
|
|
, libgcrypt
|
|
|
|
, libexsid
|
2020-08-20 17:08:02 +00:00
|
|
|
, docSupport ? true
|
2021-04-17 00:35:05 +00:00
|
|
|
, doxygen
|
|
|
|
, graphviz
|
2020-08-20 17:08:02 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libsidplayfp";
|
2022-11-27 09:42:12 +00:00
|
|
|
version = "2.4.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-17 00:35:05 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "libsidplayfp";
|
|
|
|
repo = "libsidplayfp";
|
|
|
|
rev = "v${version}";
|
|
|
|
fetchSubmodules = true;
|
2022-11-27 09:42:12 +00:00
|
|
|
sha256 = "sha256-stfpyJC1AVmDh1Nk5c5Lv0j6ic2AU6mwY02L/IDr8tE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-04-17 00:35:05 +00:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config perl xa ]
|
|
|
|
++ lib.optionals docSupport [ doxygen graphviz ];
|
|
|
|
|
|
|
|
buildInputs = [ libgcrypt libexsid ];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
checkInputs = [ unittest-cpp ];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installTargets = [ "install" ]
|
2021-04-17 00:35:05 +00:00
|
|
|
++ lib.optionals docSupport [ "doc" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
outputs = [ "out" ]
|
2021-04-17 00:35:05 +00:00
|
|
|
++ lib.optionals docSupport [ "doc" ];
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-hardsid"
|
|
|
|
"--with-gcrypt"
|
|
|
|
"--with-exsid"
|
|
|
|
]
|
|
|
|
++ lib.optional doCheck "--enable-tests";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-17 00:35:05 +00:00
|
|
|
postInstall = lib.optionalString docSupport ''
|
2020-04-24 23:36:52 +00:00
|
|
|
mkdir -p $doc/share/doc/libsidplayfp
|
|
|
|
mv docs/html $doc/share/doc/libsidplayfp/
|
|
|
|
'';
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
passthru = {
|
2022-12-28 21:21:41 +00:00
|
|
|
updateScript = nix-update-script { };
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A library to play Commodore 64 music derived from libsidplay2";
|
2021-04-17 00:35:05 +00:00
|
|
|
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";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = with licenses; [ gpl2Plus ];
|
2021-04-17 00:35:05 +00:00
|
|
|
maintainers = with maintainers; [ ramkromberg OPNA2608 ];
|
|
|
|
platforms = platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|