1{ stdenv, fetchurl, pkgconfig
2, docSupport ? true, doxygen ? null, graphviz ? null }:
3
4assert docSupport -> doxygen != null && graphviz != null;
5
6stdenv.mkDerivation rec {
7 pname = "libsidplayfp";
8 major = "1";
9 minor = "8";
10 level = "6";
11 version = "${major}.${minor}.${level}";
12 name = "${pname}-${version}";
13
14 src = fetchurl {
15 url = "mirror://sourceforge/sidplay-residfp/${pname}/${major}.${minor}/${name}.tar.gz";
16 sha256 = "0lzivfdq0crmfr01c6f5h883yr7wvagq198xkk3srdmvshhxmwnw";
17 };
18
19 nativeBuildInputs = [ pkgconfig ]
20 ++ stdenv.lib.optionals docSupport [ doxygen graphviz ];
21
22 installTargets = [ "install" ]
23 ++ stdenv.lib.optionals docSupport [ "doc" ];
24
25 outputs = [ "out" ] ++ stdenv.lib.optionals docSupport [ "doc" ];
26
27 postInstall = stdenv.lib.optionalString docSupport ''
28 mkdir -p $doc/share/doc/libsidplayfp
29 mv docs/html $doc/share/doc/libsidplayfp/
30 '';
31
32 meta = with stdenv.lib; {
33 description = "A library to play Commodore 64 music derived from libsidplay2";
34 homepage = https://sourceforge.net/projects/sidplay-residfp/;
35 license = with licenses; [ gpl2Plus ];
36 maintainers = with maintainers; [ ramkromberg ];
37 platforms = with platforms; unix;
38 };
39}