@@ -0,0 +1,34 @@
1+{ stdenv, fetchurl
2+
3+, SystemConfiguration ? null, Foundation ? null
4+}:
5+
6+assert stdenv.isDarwin -> SystemConfiguration != null
7+ && Foundation != null;
8+
9+stdenv.mkDerivation rec {
10+ version = "1.8.29";
11+ name = "htmldoc-${version}";
12+ src = fetchurl {
13+ url = "https://github.com/michaelrsweet/htmldoc/releases/download"
14+ + "/release-${version}/htmldoc-${version}-source.tar.gz";
15+ sha256 = "15x0xdf487j4i4gfap5yr83airxnbp2v4lxaz79a4s3iirrq39p0";
16+ };
17+ buildInputs = with stdenv;
18+ lib.optional isDarwin SystemConfiguration
19+ ++ lib.optional isDarwin Foundation;
20+
21+ meta = with stdenv.lib; {
22+ description = "Converts HTML files to PostScript and PDF";
23+ homepage = https://michaelrsweet.github.io/htmldoc;
24+ license = licenses.gpl2;
25+ maintainers = with maintainers; [ viric shanemikel ];
26+ platforms = with platforms; linux ++ darwin;
27+
28+ longDescription = ''
29+ HTMLDOC is a program that reads HTML source files or web pages and
30+ generates corresponding HTML, PostScript, or PDF files with an optional
31+ table of contents.
32+ '';
33+ };
34+}