summary refs log tree commit diff
path: root/pkgs/tools/text/groff/default.nix
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2010-08-21 16:54:24 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2010-08-21 16:54:24 +0000
commit49893ec540443f319f8d2c41d3f6f217c9d09702 (patch)
tree4f7effa3cf597d92a883e65a44c4317c89a30f04 /pkgs/tools/text/groff/default.nix
parente0b377fd81a3d373c40f5ffb5883b2a43916f3f2 (diff)
downloadnixpkgs-49893ec540443f319f8d2c41d3f6f217c9d09702.tar
nixpkgs-49893ec540443f319f8d2c41d3f6f217c9d09702.tar.gz
nixpkgs-49893ec540443f319f8d2c41d3f6f217c9d09702.tar.bz2
nixpkgs-49893ec540443f319f8d2c41d3f6f217c9d09702.tar.lz
nixpkgs-49893ec540443f319f8d2c41d3f6f217c9d09702.tar.xz
nixpkgs-49893ec540443f319f8d2c41d3f6f217c9d09702.tar.zst
nixpkgs-49893ec540443f319f8d2c41d3f6f217c9d09702.zip
Allowing cross-build of groff
svn path=/nixpkgs/branches/stdenv-updates/; revision=23314
Diffstat (limited to 'pkgs/tools/text/groff/default.nix')
-rw-r--r--pkgs/tools/text/groff/default.nix13
1 files changed, 11 insertions, 2 deletions
diff --git a/pkgs/tools/text/groff/default.nix b/pkgs/tools/text/groff/default.nix
index 060e5d5e2c7..243fe8dcab8 100644
--- a/pkgs/tools/text/groff/default.nix
+++ b/pkgs/tools/text/groff/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ghostscript, perl }:
+{ stdenv, fetchurl, ghostscript, perl, groff }:
 
 stdenv.mkDerivation rec {
   name = "groff-1.20.1";
@@ -8,10 +8,19 @@ stdenv.mkDerivation rec {
     sha256 = "01fq5i68p4s4fc6m8i90y5d28wk1x6zh2mkw85n0qqnb6n0qfidn";
   };
 
-  buildInputs = [ ghostscript perl ];
+  buildInputs = [ ghostscript ];
+  buildNativeInputs = [ perl ];
 
   doCheck = true;
 
+  crossAttrs = {
+    # Trick to get the build system find the proper 'native' groff
+    # http://www.mail-archive.com/bug-groff@gnu.org/msg01335.html
+    preBuild = ''
+      makeFlags="GROFF_BIN_PATH=${groff}/bin GROFFBIN=${groff}/bin/groff"
+    '';
+  };
+
   meta = {
     description = "GNU Troff, a typesetting package that reads plain text and produces formatted output";