2020-08-04 07:37:54 +01:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2021-03-28 13:24:39 +01:00
|
|
|
, fetchFromGitHub
|
2021-06-16 09:53:56 +01:00
|
|
|
, nix-update-script
|
2021-03-28 13:24:39 +01:00
|
|
|
, autoreconfHook
|
|
|
|
, perl
|
2021-01-19 06:50:56 +00:00
|
|
|
, pkg-config
|
2020-08-04 07:37:54 +01:00
|
|
|
, libsidplayfp
|
|
|
|
, alsaSupport ? stdenv.hostPlatform.isLinux
|
2021-06-10 03:57:09 +01:00
|
|
|
, alsa-lib
|
2020-08-04 07:37:54 +01:00
|
|
|
, pulseSupport ? stdenv.hostPlatform.isLinux
|
|
|
|
, libpulseaudio
|
2021-03-28 13:24:39 +01:00
|
|
|
, out123Support ? stdenv.hostPlatform.isDarwin
|
|
|
|
, mpg123
|
2020-08-04 07:37:54 +01:00
|
|
|
}:
|
2018-07-01 11:36:57 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "sidplayfp";
|
2022-01-29 09:21:02 +00:00
|
|
|
version = "2.2.3";
|
2018-07-01 11:36:57 +01:00
|
|
|
|
2021-03-28 13:24:39 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "libsidplayfp";
|
|
|
|
repo = "sidplayfp";
|
|
|
|
rev = "v${version}";
|
2022-01-29 09:21:02 +00:00
|
|
|
sha256 = "sha256-R60Dh19GYM157ysmN8EOJ47eO8a7sdkEEF1TObG1xzk=";
|
2018-07-01 11:36:57 +01:00
|
|
|
};
|
|
|
|
|
2021-03-28 13:24:39 +01:00
|
|
|
nativeBuildInputs = [ autoreconfHook perl pkg-config ];
|
2020-08-04 07:37:54 +01:00
|
|
|
|
2021-03-28 13:24:39 +01:00
|
|
|
buildInputs = [ libsidplayfp ]
|
2021-06-10 03:57:09 +01:00
|
|
|
++ lib.optional alsaSupport alsa-lib
|
2021-03-28 13:24:39 +01:00
|
|
|
++ lib.optional pulseSupport libpulseaudio
|
|
|
|
++ lib.optional out123Support mpg123;
|
|
|
|
|
|
|
|
configureFlags = lib.optionals out123Support [
|
|
|
|
"--with-out123"
|
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2018-07-01 11:36:57 +01:00
|
|
|
|
2021-06-16 09:53:56 +01:00
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script {
|
|
|
|
attrPath = pname;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2020-08-04 07:37:54 +01:00
|
|
|
meta = with lib; {
|
2018-07-01 11:36:57 +01:00
|
|
|
description = "A SID player using libsidplayfp";
|
2021-03-28 13:24:39 +01:00
|
|
|
homepage = "https://github.com/libsidplayfp/sidplayfp";
|
2018-07-01 11:36:57 +01:00
|
|
|
license = with licenses; [ gpl2Plus ];
|
2021-03-28 13:24:39 +01:00
|
|
|
maintainers = with maintainers; [ dezgeg OPNA2608 ];
|
|
|
|
platforms = platforms.all;
|
2018-07-01 11:36:57 +01:00
|
|
|
};
|
|
|
|
}
|