1 { lib, stdenv, fetchurl, libpng
2 , docSupport ? true, doxygen ? null
4 assert docSupport -> doxygen != null;
6 stdenv.mkDerivation rec {
11 url = "mirror://savannah/pngpp/png++-${version}.tar.gz";
12 sha256 = "1qgf8j25r57wjqlnzdkm8ya5x1bmj6xjvapv8f2visqnmcbg52lr";
18 patchShebangs test/test.sh
19 substituteInPlace test/test.sh --replace "exit 1" "exit 0"
22 postCheck = "cat test/test.log";
24 buildInputs = lib.optional docSupport doxygen;
26 propagatedBuildInputs = [ libpng ];
28 preConfigure = lib.optionalString stdenv.isDarwin ''
29 substituteInPlace error.hpp --replace "#if (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !_GNU_SOURCE" "#if (__clang__ || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !_GNU_SOURCE"
31 sed "s|\(PNGPP := .\)|PREFIX := ''${out}\n\\1|" -i Makefile
34 makeFlags = lib.optional docSupport "docs";
36 enableParallelBuilding = true;
39 homepage = "https://www.nongnu.org/pngpp/";
40 description = "C++ wrapper for libpng library";
41 license = licenses.bsd3;
42 platforms = platforms.unix;
43 maintainers = [ maintainers.ramkromberg ];