diff options
Diffstat (limited to 'nixpkgs/pkgs/tools/text/groff/default.nix')
-rw-r--r-- | nixpkgs/pkgs/tools/text/groff/default.nix | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/nixpkgs/pkgs/tools/text/groff/default.nix b/nixpkgs/pkgs/tools/text/groff/default.nix index 73c8ed683423..892aeb463f88 100644 --- a/nixpkgs/pkgs/tools/text/groff/default.nix +++ b/nixpkgs/pkgs/tools/text/groff/default.nix @@ -1,9 +1,9 @@ -{ stdenv, fetchurl, perl +{ lib, stdenv, fetchurl, perl , ghostscript #for postscript and html output , psutils, netpbm #for html output , buildPackages , autoreconfHook -, pkgconfig +, pkg-config , texinfo }: @@ -24,22 +24,22 @@ stdenv.mkDerivation rec { ./0001-Fix-cross-compilation-by-looking-for-ar.patch ]; - postPatch = stdenv.lib.optionalString (psutils != null) '' + postPatch = lib.optionalString (psutils != null) '' substituteInPlace src/preproc/html/pre-html.cpp \ --replace "psselect" "${psutils}/bin/psselect" - '' + stdenv.lib.optionalString (netpbm != null) '' + '' + lib.optionalString (netpbm != null) '' substituteInPlace src/preproc/html/pre-html.cpp \ - --replace "pnmcut" "${stdenv.lib.getBin netpbm}/bin/pnmcut" \ - --replace "pnmcrop" "${stdenv.lib.getBin netpbm}/bin/pnmcrop" \ - --replace "pnmtopng" "${stdenv.lib.getBin netpbm}/bin/pnmtopng" + --replace "pnmcut" "${lib.getBin netpbm}/bin/pnmcut" \ + --replace "pnmcrop" "${lib.getBin netpbm}/bin/pnmcrop" \ + --replace "pnmtopng" "${lib.getBin netpbm}/bin/pnmtopng" substituteInPlace tmac/www.tmac \ - --replace "pnmcrop" "${stdenv.lib.getBin netpbm}/bin/pnmcrop" \ - --replace "pngtopnm" "${stdenv.lib.getBin netpbm}/bin/pngtopnm" \ - --replace "@PNMTOPS_NOSETPAGE@" "${stdenv.lib.getBin netpbm}/bin/pnmtops -nosetpage" + --replace "pnmcrop" "${lib.getBin netpbm}/bin/pnmcrop" \ + --replace "pngtopnm" "${lib.getBin netpbm}/bin/pngtopnm" \ + --replace "@PNMTOPS_NOSETPAGE@" "${lib.getBin netpbm}/bin/pnmtops -nosetpage" ''; buildInputs = [ ghostscript psutils netpbm perl ]; - nativeBuildInputs = [ autoreconfHook pkgconfig texinfo ]; + nativeBuildInputs = [ autoreconfHook pkg-config texinfo ]; # Builds running without a chroot environment may detect the presence # of /usr/X11 in the host system, leading to an impure build of the @@ -48,14 +48,14 @@ stdenv.mkDerivation rec { # have to pass "--with-appresdir", too. configureFlags = [ "--without-x" - ] ++ stdenv.lib.optionals (ghostscript != null) [ + ] ++ lib.optionals (ghostscript != null) [ "--with-gs=${ghostscript}/bin/gs" - ] ++ stdenv.lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ + ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ "ac_cv_path_PERL=${buildPackages.perl}/bin/perl" "gl_cv_func_signbit=yes" ]; - makeFlags = stdenv.lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ + makeFlags = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ # Trick to get the build system find the proper 'native' groff # http://www.mail-archive.com/bug-groff@gnu.org/msg01335.html "GROFF_BIN_PATH=${buildPackages.groff}/bin" @@ -99,11 +99,11 @@ stdenv.mkDerivation rec { substituteInPlace $perl/bin/grog \ --replace $out/lib/groff/grog $perl/lib/groff/grog - '' + stdenv.lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' + '' + lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' find $perl/ -type f -print0 | xargs --null sed -i 's|${buildPackages.perl}|${perl}|' ''; - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://www.gnu.org/software/groff/"; description = "GNU Troff, a typesetting package that reads plain text and produces formatted output"; license = licenses.gpl3Plus; |