nixpkgs/pkgs/development/libraries/libsidplayfp/default.nix

46 lines
1.2 KiB
Nix
Raw Normal View History

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