summary refs log tree commit diff
path: root/pkgs/tools/typesetting/htmldoc/default.nix
blob: ae6e2e9006e6489093dbfe9d4597ad56ec5628be (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ stdenv, fetchurl

, SystemConfiguration ? null, Foundation ? null
}:

assert stdenv.isDarwin -> SystemConfiguration != null
                       && Foundation != null;

stdenv.mkDerivation rec {
  version = "1.8.29";
  pname = "htmldoc";
  src = fetchurl {
    url = "https://github.com/michaelrsweet/htmldoc/releases/download"
      + "/release-${version}/htmldoc-${version}-source.tar.gz";
    sha256 = "15x0xdf487j4i4gfap5yr83airxnbp2v4lxaz79a4s3iirrq39p0";
  };
  buildInputs = with stdenv;
       lib.optional isDarwin SystemConfiguration
    ++ lib.optional isDarwin Foundation;

  meta = with stdenv.lib; {
    description = "Converts HTML files to PostScript and PDF";
    homepage    = "https://michaelrsweet.github.io/htmldoc";
    license     = licenses.gpl2;
    maintainers = with maintainers; [ shanemikel ];
    platforms   = with platforms; linux ++ darwin;

    longDescription = ''
      HTMLDOC is a program that reads HTML source files or web pages and
      generates corresponding HTML, PostScript, or PDF files with an optional
      table of contents.
    '';
  };
}