From 63bd364cf9bf8ce24a2b0057e9b89b1b58e4b725 Mon Sep 17 00:00:00 2001 From: Shane Pearlman Date: Sat, 18 Mar 2017 21:44:55 -0700 Subject: [PATCH 1/3] htmldoc: add darwin support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I also added a long description and updated the homepage to point to the author’s new github.io site. --- lib/maintainers.nix | 1 + pkgs/applications/misc/htmldoc/default.nix | 16 ----------- pkgs/tools/typesetting/htmldoc/default.nix | 32 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 8 +++--- 4 files changed, 37 insertions(+), 20 deletions(-) delete mode 100644 pkgs/applications/misc/htmldoc/default.nix create mode 100644 pkgs/tools/typesetting/htmldoc/default.nix diff --git a/lib/maintainers.nix b/lib/maintainers.nix index e7b8ff7bf101..3264d7fcba27 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -453,6 +453,7 @@ scolobb = "Sergiu Ivanov "; sepi = "Raffael Mancini "; seppeljordan = "Sebastian Jordan "; + shanemikel = "Shane Pearlman "; sheenobu = "Sheena Artrip "; sheganinans = "Aistis Raulinaitis "; shell = "Shell Turner "; diff --git a/pkgs/applications/misc/htmldoc/default.nix b/pkgs/applications/misc/htmldoc/default.nix deleted file mode 100644 index e8274418ae16..000000000000 --- a/pkgs/applications/misc/htmldoc/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ stdenv, fetchurl, fltk, openssl, libpng, libjpeg }: -stdenv.mkDerivation rec { - name = "htmldoc-1.8.27"; - src = fetchurl { - url = http://ftp.easysw.com/pub/htmldoc/1.8.27/htmldoc-1.8.27-source.tar.bz2; - sha256 = "04wnxgx6fxdxwiy9vbawdibngwf55mi01hjrr5fkfs22fcix5zw9"; - }; - buildInputs = [ fltk openssl libpng libjpeg ]; - meta = { - homepage = http://www.htmldoc.org/; - description = "Converts HTML files to indexed HTML, PS or PDF"; - license = stdenv.lib.licenses.gpl2; - maintainers = with stdenv.lib.maintainers; [ viric ]; - platforms = with stdenv.lib.platforms; linux; - }; -} diff --git a/pkgs/tools/typesetting/htmldoc/default.nix b/pkgs/tools/typesetting/htmldoc/default.nix new file mode 100644 index 000000000000..74abb8e60c6a --- /dev/null +++ b/pkgs/tools/typesetting/htmldoc/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchurl + +, SystemConfiguration ? null, Foundation ? null +}: + +assert stdenv.isDarwin -> SystemConfiguration != null + && Foundation != null; + +stdenv.mkDerivation { + name = "htmldoc-1.8.29"; + src = fetchurl { + url = "https://github.com/michaelrsweet/htmldoc/releases/download" + + "/release-1.8.29/htmldoc-1.8.29-source.tar.gz"; + md5 = "14d32bd772e2bc6af7b9b2233724c3ec"; + }; + buildInputs = + stdenv.lib.ifEnable stdenv.isDarwin [SystemConfiguration 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; [ viric 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. + ''; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9686b1c62d64..1957b18cb8cb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4356,6 +4356,10 @@ with pkgs; html-xml-utils = callPackage ../tools/text/xml/html-xml-utils { }; + htmldoc = callPackage ../tools/typesetting/htmldoc { + inherit (darwin.apple_sdk.frameworks) SystemConfiguration Foundation; + }; + rcm = callPackage ../tools/misc/rcm {}; tftp-hpa = callPackage ../tools/networking/tftp-hpa {}; @@ -13902,10 +13906,6 @@ with pkgs; ht = callPackage ../applications/editors/ht { }; - htmldoc = callPackage ../applications/misc/htmldoc { - fltk = fltk13; - }; - hugin = callPackage ../applications/graphics/hugin { }; hugo = callPackage ../applications/misc/hugo { }; From 1b10483b5e217fd1725b90009a45c05443cba737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 19 Mar 2017 13:31:13 +0100 Subject: [PATCH 2/3] htmldoc: use sha256 instead of md5 --- pkgs/tools/typesetting/htmldoc/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/typesetting/htmldoc/default.nix b/pkgs/tools/typesetting/htmldoc/default.nix index 74abb8e60c6a..0cd1343dd4b5 100644 --- a/pkgs/tools/typesetting/htmldoc/default.nix +++ b/pkgs/tools/typesetting/htmldoc/default.nix @@ -6,12 +6,13 @@ assert stdenv.isDarwin -> SystemConfiguration != null && Foundation != null; -stdenv.mkDerivation { - name = "htmldoc-1.8.29"; +stdenv.mkDerivation rec { + version = "1.8.29"; + name = "htmldoc-${version}"; src = fetchurl { url = "https://github.com/michaelrsweet/htmldoc/releases/download" - + "/release-1.8.29/htmldoc-1.8.29-source.tar.gz"; - md5 = "14d32bd772e2bc6af7b9b2233724c3ec"; + + "/release-${version}/htmldoc-${version}-source.tar.gz"; + sha256 = "15x0xdf487j4i4gfap5yr83airxnbp2v4lxaz79a4s3iirrq39p0"; }; buildInputs = stdenv.lib.ifEnable stdenv.isDarwin [SystemConfiguration Foundation]; From fa9400f16f9737ebb6cd1aec3a534a645db23fc7 Mon Sep 17 00:00:00 2001 From: Shane Pearlman Date: Sun, 19 Mar 2017 14:21:29 -0700 Subject: [PATCH 3/3] htmldoc: use stdenv.lib.optional instead of stdenv.lib.enable --- pkgs/tools/typesetting/htmldoc/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/typesetting/htmldoc/default.nix b/pkgs/tools/typesetting/htmldoc/default.nix index 0cd1343dd4b5..b9d5407c68de 100644 --- a/pkgs/tools/typesetting/htmldoc/default.nix +++ b/pkgs/tools/typesetting/htmldoc/default.nix @@ -14,8 +14,9 @@ stdenv.mkDerivation rec { + "/release-${version}/htmldoc-${version}-source.tar.gz"; sha256 = "15x0xdf487j4i4gfap5yr83airxnbp2v4lxaz79a4s3iirrq39p0"; }; - buildInputs = - stdenv.lib.ifEnable stdenv.isDarwin [SystemConfiguration Foundation]; + buildInputs = with stdenv; + lib.optional isDarwin SystemConfiguration + ++ lib.optional isDarwin Foundation; meta = with stdenv.lib; { description = "Converts HTML files to PostScript and PDF";