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.
This commit is contained in:
parent
dec9e66ea1
commit
8f0511b0a0
|
@ -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/;
|
||||
|
|
|
@ -974,7 +974,8 @@ let
|
|||
|
||||
g500-control = callPackage ../tools/misc/g500-control { };
|
||||
|
||||
gawk = callPackage ../tools/text/gawk { };
|
||||
gawk = lowPrio (callPackage ../tools/text/gawk { });
|
||||
gawkInteractive = gawk.override { readlineSupport = true; };
|
||||
|
||||
gdmap = callPackage ../tools/system/gdmap { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue