git.iko.soy/typeable/nixpkgs
on master help sign in
groff: add missing depedencies for optional postscript and html outputs
commit14e9972e497a07f83e97d91bb18d126d63e68ee5 authorRam Kromberg <ramkromberg@mail.com> dateMon 12 Sep 2016, 18:26 (10 years ago) parent77b9abf
2 files changed+26−3
pkgs/tools/text/groff/default.nix+24−3 pkgs/top-level/all-packages.nix+2
pkgs/tools/text/groff/default.nix+24−3
@@ -1,4 +1,7 @@
1−{ stdenv, fetchurl, ghostscript, perl, groff }:
1+{ stdenv, fetchurl, perl, groff
2+, ghostscript #for postscript and html output
3+, psutils, netpbm #for html output
4+}:
25
36stdenv.mkDerivation rec {
47 name = "groff-1.22.3";
@@ -12,7 +15,21 @@ stdenv.mkDerivation rec {
1215
1316 enableParallelBuilding = false;
1417
15− buildInputs = [ ghostscript ];
18+ postPatch = stdenv.lib.optionalString (psutils != null) ''
19+ substituteInPlace src/preproc/html/pre-html.cpp \
20+ --replace "psselect" "${psutils}/bin/psselect"
21+ '' + stdenv.lib.optionalString (netpbm != null) ''
22+ substituteInPlace src/preproc/html/pre-html.cpp \
23+ --replace "pnmcut" "${netpbm}/bin/pnmcut" \
24+ --replace "pnmcrop" "${netpbm}/bin/pnmcrop" \
25+ --replace "pnmtopng" "${netpbm}/bin/pnmtopng"
26+ substituteInPlace tmac/www.tmac \
27+ --replace "pnmcrop" "${netpbm}/bin/pnmcrop" \
28+ --replace "pngtopnm" "${netpbm}/bin/pngtopnm" \
29+ --replace "@PNMTOPS_NOSETPAGE@" "${netpbm}/bin/pnmtops -nosetpage"
30+ '';
31+
32+ buildInputs = [ ghostscript psutils netpbm ];
1633 nativeBuildInputs = [ perl ];
1734
1835 # Builds running without a chroot environment may detect the presence
@@ -20,7 +37,11 @@ stdenv.mkDerivation rec {
2037 # package. To avoid this issue, X11 support is explicitly disabled.
2138 # Note: If we ever want to *enable* X11 support, then we'll probably
2239 # have to pass "--with-appresdir", too.
23− configureFlags = "--without-x";
40+ configureFlags = [
41+ "--without-x"
42+ ] ++ stdenv.lib.optionals (ghostscript != null) [
43+ "--with-gs=${ghostscript}/bin/gs"
44+ ];
2445
2546 doCheck = true;
2647
pkgs/top-level/all-packages.nix+2
@@ -1907,6 +1907,8 @@ in
19071907
19081908 groff = callPackage ../tools/text/groff {
19091909 ghostscript = null;
1910+ psutils = null;
1911+ netpbm = null;
19101912 };
19111913
19121914 groonga = callPackage ../servers/search/groonga { };