groff: Enable cross-compilation

This commit is contained in:
Ben Gamari
2018-02-13 09:44:28 -06:00
committed by Will Dietz
parent 46c2e619e8
commit 4f3c8178b8
2 changed files with 45 additions and 0 deletions
+6
View File
@@ -2,6 +2,7 @@
, ghostscript #for postscript and html output
, psutils, netpbm #for html output
, buildPackages
, autoreconfHook
}:
stdenv.mkDerivation rec {
@@ -17,6 +18,8 @@ stdenv.mkDerivation rec {
enableParallelBuilding = false;
patches = [ ./look-for-ar.patch ];
postPatch = stdenv.lib.optionalString (psutils != null) ''
substituteInPlace src/preproc/html/pre-html.cpp \
--replace "psselect" "${psutils}/bin/psselect"
@@ -32,6 +35,7 @@ stdenv.mkDerivation rec {
'';
buildInputs = [ ghostscript psutils netpbm perl ];
nativeBuildInputs = [ autoreconfHook ];
# Builds running without a chroot environment may detect the presence
# of /usr/X11 in the host system, leading to an impure build of the
@@ -42,6 +46,8 @@ stdenv.mkDerivation rec {
"--without-x"
] ++ stdenv.lib.optionals (ghostscript != null) [
"--with-gs=${ghostscript}/bin/gs"
] ++ stdenv.lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
"ac_cv_path_PERL=${perl}/bin/perl"
];
doCheck = true;