diff options
author | Andrew Childs <lorne@cons.org.nz> | 2019-12-28 17:51:03 +0900 |
---|---|---|
committer | Bjørn Forsman <bjorn.forsman@gmail.com> | 2019-12-30 17:21:39 +0100 |
commit | 6dd60c6cac8abc95f13f8bdd068d2c18865ca8b7 (patch) | |
tree | 53178b2698f1ebac7cbf13c22dd98ef91c11b16c /pkgs/development/tools/misc/texinfo/common.nix | |
parent | 2e8e023363d312d8ff506bbdb80b8eb261139305 (diff) |
texinfoInteractive: fix cross build
Diffstat (limited to 'pkgs/development/tools/misc/texinfo/common.nix')
-rw-r--r-- | pkgs/development/tools/misc/texinfo/common.nix | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/development/tools/misc/texinfo/common.nix b/pkgs/development/tools/misc/texinfo/common.nix index 7741f2d4ffbcb..40dafe27da2a6 100644 --- a/pkgs/development/tools/misc/texinfo/common.nix +++ b/pkgs/development/tools/misc/texinfo/common.nix @@ -6,6 +6,10 @@ , interactive ? false, ncurses, procps }: +let + crossBuildTools = interactive && stdenv.hostPlatform != stdenv.buildPlatform; +in + with stdenv.lib; stdenv.mkDerivation { @@ -17,7 +21,13 @@ stdenv.mkDerivation { inherit sha256; }; - patches = optional (version == "6.5") ./perl.patch; + patches = optional (version == "6.5") ./perl.patch + ++ optional crossBuildTools ./cross-tools-flags.patch; + + # ncurses is required to build `makedoc' + # this feature is introduced by the ./cross-tools-flags.patch + NATIVE_TOOLS_CFLAGS = if crossBuildTools then "-I${getDev buildPackages.ncurses}/include" else null; + NATIVE_TOOLS_LDFLAGS = if crossBuildTools then "-L${getLib buildPackages.ncurses}/lib" else null; # We need a native compiler to build perl XS extensions # when cross-compiling. |