mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 06:45:16 +01:00
groff: add missing depedencies for optional postscript and html outputs
This commit is contained in:
parent
77b9abf78c
commit
14e9972e49
2 changed files with 26 additions and 3 deletions
|
@ -1,4 +1,7 @@
|
|||
{ stdenv, fetchurl, ghostscript, perl, groff }:
|
||||
{ stdenv, fetchurl, perl, groff
|
||||
, ghostscript #for postscript and html output
|
||||
, psutils, netpbm #for html output
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "groff-1.22.3";
|
||||
|
@ -12,7 +15,21 @@ stdenv.mkDerivation rec {
|
|||
|
||||
enableParallelBuilding = false;
|
||||
|
||||
buildInputs = [ ghostscript ];
|
||||
postPatch = stdenv.lib.optionalString (psutils != null) ''
|
||||
substituteInPlace src/preproc/html/pre-html.cpp \
|
||||
--replace "psselect" "${psutils}/bin/psselect"
|
||||
'' + stdenv.lib.optionalString (netpbm != null) ''
|
||||
substituteInPlace src/preproc/html/pre-html.cpp \
|
||||
--replace "pnmcut" "${netpbm}/bin/pnmcut" \
|
||||
--replace "pnmcrop" "${netpbm}/bin/pnmcrop" \
|
||||
--replace "pnmtopng" "${netpbm}/bin/pnmtopng"
|
||||
substituteInPlace tmac/www.tmac \
|
||||
--replace "pnmcrop" "${netpbm}/bin/pnmcrop" \
|
||||
--replace "pngtopnm" "${netpbm}/bin/pngtopnm" \
|
||||
--replace "@PNMTOPS_NOSETPAGE@" "${netpbm}/bin/pnmtops -nosetpage"
|
||||
'';
|
||||
|
||||
buildInputs = [ ghostscript psutils netpbm ];
|
||||
nativeBuildInputs = [ perl ];
|
||||
|
||||
# Builds running without a chroot environment may detect the presence
|
||||
|
@ -20,7 +37,11 @@ stdenv.mkDerivation rec {
|
|||
# package. To avoid this issue, X11 support is explicitly disabled.
|
||||
# Note: If we ever want to *enable* X11 support, then we'll probably
|
||||
# have to pass "--with-appresdir", too.
|
||||
configureFlags = "--without-x";
|
||||
configureFlags = [
|
||||
"--without-x"
|
||||
] ++ stdenv.lib.optionals (ghostscript != null) [
|
||||
"--with-gs=${ghostscript}/bin/gs"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
|
|
|
@ -1907,6 +1907,8 @@ in
|
|||
|
||||
groff = callPackage ../tools/text/groff {
|
||||
ghostscript = null;
|
||||
psutils = null;
|
||||
netpbm = null;
|
||||
};
|
||||
|
||||
groonga = callPackage ../servers/search/groonga { };
|
||||
|
|
Loading…
Reference in a new issue