2020-08-04 06:27:30 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchurl
|
2021-01-19 06:50:56 +00:00
|
|
|
, pkg-config
|
2020-08-04 06:27:30 +00:00
|
|
|
, docSupport ? true
|
|
|
|
, doxygen ? null
|
|
|
|
, graphviz ? null
|
|
|
|
}:
|
2016-08-05 16:50:36 +00:00
|
|
|
|
|
|
|
assert docSupport -> doxygen != null && graphviz != null;
|
2020-08-04 06:27:30 +00:00
|
|
|
let
|
|
|
|
inherit (lib) optionals optionalString;
|
|
|
|
inherit (lib.versions) majorMinor;
|
|
|
|
in
|
2016-08-05 16:50:36 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libsidplayfp";
|
2020-11-03 06:32:05 +00:00
|
|
|
version = "2.0.5";
|
2016-08-05 16:50:36 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2020-08-04 06:27:30 +00:00
|
|
|
url = "mirror://sourceforge/sidplay-residfp/${pname}/${majorMinor version}/${pname}-${version}.tar.gz";
|
2020-11-03 06:32:05 +00:00
|
|
|
sha256 = "04vdrrkh5y9x9rrmj6gdp242ah70b4sslwqfby8wp2riis4hr9z0";
|
2016-08-05 16:50:36 +00:00
|
|
|
};
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ]
|
2020-08-04 06:27:30 +00:00
|
|
|
++ optionals docSupport [ doxygen graphviz ];
|
2016-08-05 16:50:36 +00:00
|
|
|
|
|
|
|
installTargets = [ "install" ]
|
2020-08-04 06:27:30 +00:00
|
|
|
++ optionals docSupport [ "doc" ];
|
2016-08-05 16:50:36 +00:00
|
|
|
|
2020-08-04 06:27:30 +00:00
|
|
|
outputs = [ "out" ]
|
|
|
|
++ optionals docSupport [ "doc" ];
|
2016-08-05 16:50:36 +00:00
|
|
|
|
2020-08-04 06:27:30 +00:00
|
|
|
postInstall = optionalString docSupport ''
|
2016-08-05 16:50:36 +00:00
|
|
|
mkdir -p $doc/share/doc/libsidplayfp
|
|
|
|
mv docs/html $doc/share/doc/libsidplayfp/
|
|
|
|
'';
|
|
|
|
|
2020-08-04 06:27:30 +00:00
|
|
|
meta = with lib; {
|
2016-08-05 16:50:36 +00:00
|
|
|
description = "A library to play Commodore 64 music derived from libsidplay2";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://sourceforge.net/projects/sidplay-residfp/";
|
2016-08-05 16:50:36 +00:00
|
|
|
license = with licenses; [ gpl2Plus ];
|
|
|
|
maintainers = with maintainers; [ ramkromberg ];
|
|
|
|
platforms = with platforms; unix;
|
|
|
|
};
|
|
|
|
}
|