groff: Enable cross-compilation
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user