diff options
author | Kevin Quick <quick@sparq.org> | 2014-01-25 14:24:10 -0700 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2014-01-26 10:53:22 +0100 |
commit | 8f0511b0a0855746f5f1dd174295557d7c7ed9f0 (patch) | |
tree | c7a06b1f407855010046f4af40f9e99d2b7f2b62 /pkgs/tools/text/gawk | |
parent | dec9e66ea1dcedecf4a67fd82048ca97a2fbcd0e (diff) |
gawk: add gawkInteractive with readline support
stdenv (on linux) depends on gawk, readline and similar are useless for non-interactive usage.
Close #1596. Original patch was almost completely rewritten by vcunat.
On darwin we always specify whether to use readline, so it isn't always picked as reported.
Diffstat (limited to 'pkgs/tools/text/gawk')
-rw-r--r-- | pkgs/tools/text/gawk/default.nix | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pkgs/tools/text/gawk/default.nix b/pkgs/tools/text/gawk/default.nix index 901f53c5e5cc..b231f2875c09 100644 --- a/pkgs/tools/text/gawk/default.nix +++ b/pkgs/tools/text/gawk/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, libsigsegv }: +{ stdenv, fetchurl, libsigsegv, readline, readlineSupport ? false }: stdenv.mkDerivation rec { name = "gawk-4.1.0"; @@ -12,9 +12,13 @@ stdenv.mkDerivation rec { doCheck = !stdenv.isCygwin; # XXX: `test-dup2' segfaults on Cygwin 6.1 - buildInputs = [ libsigsegv ]; + buildInputs = [ libsigsegv ] + ++ stdenv.lib.optional readlineSupport readline; - configureFlags = [ "--with-libsigsegv-prefix=${libsigsegv}" ]; + configureFlags = [ "--with-libsigsegv-prefix=${libsigsegv}" ] + ++ stdenv.lib.optional readlineSupport "--with-readline=${readline}" + # only darwin where reported, seems OK on non-chrooted Fedora (don't rebuild stdenv) + ++ stdenv.lib.optional (!readlineSupport && stdenv.isDarwin) "--without-readline"; meta = { homepage = http://www.gnu.org/software/gawk/; |