summary refs log tree commit diff
path: root/pkgs/tools/text/groff/default.nix
diff options
context:
space:
mode:
authorPatrick Callahan <pxcallahan@gmail.com>2017-07-11 07:54:40 -0700
committerOrivej Desh <orivej@gmx.fr>2017-11-11 03:35:59 +0000
commitbd04a0ff0a59d2f77ecfe196ad63e82e9d1e300f (patch)
tree38f897d29f23b8cc07a6349837d98d1ff7828f83 /pkgs/tools/text/groff/default.nix
parentac522cbe95c909507cb113d1f7133d80b9c381a1 (diff)
downloadnixpkgs-bd04a0ff0a59d2f77ecfe196ad63e82e9d1e300f.tar
nixpkgs-bd04a0ff0a59d2f77ecfe196ad63e82e9d1e300f.tar.gz
nixpkgs-bd04a0ff0a59d2f77ecfe196ad63e82e9d1e300f.tar.bz2
nixpkgs-bd04a0ff0a59d2f77ecfe196ad63e82e9d1e300f.tar.lz
nixpkgs-bd04a0ff0a59d2f77ecfe196ad63e82e9d1e300f.tar.xz
nixpkgs-bd04a0ff0a59d2f77ecfe196ad63e82e9d1e300f.tar.zst
nixpkgs-bd04a0ff0a59d2f77ecfe196ad63e82e9d1e300f.zip
groff: split out perl dependencies
Diffstat (limited to 'pkgs/tools/text/groff/default.nix')
-rw-r--r--pkgs/tools/text/groff/default.nix45
1 files changed, 41 insertions, 4 deletions
diff --git a/pkgs/tools/text/groff/default.nix b/pkgs/tools/text/groff/default.nix
index 2f37f6394ba..b11f3cb4b8c 100644
--- a/pkgs/tools/text/groff/default.nix
+++ b/pkgs/tools/text/groff/default.nix
@@ -5,14 +5,15 @@
 }:
 
 stdenv.mkDerivation rec {
-  name = "groff-1.22.3";
+  name = "groff-${version}";
+  version = "1.22.3";
 
   src = fetchurl {
     url = "mirror://gnu/groff/${name}.tar.gz";
     sha256 = "1998v2kcs288d3y7kfxpvl369nqi06zbbvjzafyvyl3pr7bajj1s";
   };
 
-  outputs = [ "out" "man" "doc" "info" ];
+  outputs = [ "out" "man" "doc" "info" "perl" ];
 
   enableParallelBuilding = false;
 
@@ -30,8 +31,7 @@ stdenv.mkDerivation rec {
       --replace "@PNMTOPS_NOSETPAGE@" "${netpbm}/bin/pnmtops -nosetpage"
   '';
 
-  buildInputs = [ ghostscript psutils netpbm ];
-  nativeBuildInputs = [ perl ];
+  buildInputs = [ ghostscript psutils netpbm perl ];
 
   # Builds running without a chroot environment may detect the presence
   # of /usr/X11 in the host system, leading to an impure build of the
@@ -62,6 +62,41 @@ stdenv.mkDerivation rec {
     for f in 'man.local' 'mdoc.local'; do
         cat '${./site.tmac}' >>"$out/share/groff/site-tmac/$f"
     done
+
+    moveToOutput bin/gropdf $perl
+    moveToOutput bin/pdfmom $perl
+    moveToOutput bin/roff2text $perl
+    moveToOutput bin/roff2pdf $perl
+    moveToOutput bin/roff2ps $perl
+    moveToOutput bin/roff2dvi $perl
+    moveToOutput bin/roff2ps $perl
+    moveToOutput bin/roff2html $perl
+    moveToOutput bin/glilypond $perl
+    moveToOutput bin/mmroff $perl
+    moveToOutput bin/roff2x $perl
+    moveToOutput bin/afmtodit $perl
+    moveToOutput bin/gperl $perl
+    moveToOutput bin/chem $perl
+    moveToOutput share/groff/${version}/font/devpdf $perl
+
+    # idk if this is needed, but Fedora does it
+    moveToOutput share/groff/${version}/tmac/pdf.tmac $perl
+
+    moveToOutput bin/gpinyin $perl
+    moveToOutput lib/groff/gpinyin $perl
+    substituteInPlace $perl/bin/gpinyin \
+      --replace $out/lib/groff/gpinyin $perl/lib/groff/gpinyin
+
+    moveToOutput bin/groffer $perl
+    moveToOutput lib/groff/groffer $perl
+    substituteInPlace $perl/bin/groffer \
+      --replace $out/lib/groff/groffer $perl/lib/groff/groffer
+
+    moveToOutput bin/grog $perl
+    moveToOutput lib/groff/grog $perl
+    substituteInPlace $perl/bin/grog \
+      --replace $out/lib/groff/grog $perl/lib/groff/grog
+
   '';
 
   meta = with stdenv.lib; {
@@ -82,5 +117,7 @@ stdenv.mkDerivation rec {
       version gxditview of the X11 xditview previewer, and an
       implementation of the -mm macros.
     '';
+
+    outputsToInstall = [ "out" "perl" ];
   };
 }