diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2014-08-27 01:14:09 +0200 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2014-08-27 01:14:09 +0200 |
commit | fb59f27a4368b1436518f9f76c6e2e68f60b92a6 (patch) | |
tree | a68c3ac03a7ea04fd4b756a9d3cabf2667896e62 /pkgs/tools/text/gawk | |
parent | 4dccb224c584194e964b5fbef5fe2cee28c57803 (diff) | |
download | nixlib-fb59f27a4368b1436518f9f76c6e2e68f60b92a6.tar nixlib-fb59f27a4368b1436518f9f76c6e2e68f60b92a6.tar.gz nixlib-fb59f27a4368b1436518f9f76c6e2e68f60b92a6.tar.bz2 nixlib-fb59f27a4368b1436518f9f76c6e2e68f60b92a6.tar.lz nixlib-fb59f27a4368b1436518f9f76c6e2e68f60b92a6.tar.xz nixlib-fb59f27a4368b1436518f9f76c6e2e68f60b92a6.tar.zst nixlib-fb59f27a4368b1436518f9f76c6e2e68f60b92a6.zip |
WIP: getting good
Diffstat (limited to 'pkgs/tools/text/gawk')
-rw-r--r-- | pkgs/tools/text/gawk/default.nix | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/pkgs/tools/text/gawk/default.nix b/pkgs/tools/text/gawk/default.nix index 8866888a7367..432d7b587120 100644 --- a/pkgs/tools/text/gawk/default.nix +++ b/pkgs/tools/text/gawk/default.nix @@ -1,5 +1,8 @@ -{ stdenv, fetchurl, libsigsegv, readline, readlineSupport ? false }: +{ stdenv, fetchurl, libsigsegv, readline, interactive ? false }: +let + inherit (stdenv.lib) optional; +in stdenv.mkDerivation rec { name = "gawk-4.1.0"; @@ -8,15 +11,17 @@ stdenv.mkDerivation rec { sha256 = "0hin2hswbbd6kd6i4zzvgciwpl5fba8d2s524z8y5qagyz3x010q"; }; - doCheck = !stdenv.isCygwin; # XXX: `test-dup2' segfaults on Cygwin 6.1 + # When we do build separate interactive version, it makes sense to always include docs. + #outputs = stdenv.lib.optionals (!interactive) [ "out" "doc" ]; #ToDo buildInputs = [ libsigsegv ] - ++ stdenv.lib.optional readlineSupport readline; + ++ optional (!interactive) stdenv.hookLib.multiout + ++ optional interactive readline; 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"; + ++ [(if interactive then "--with-readline=${readline}" else "--without-readline")]; + + doCheck = !stdenv.isCygwin; # XXX: `test-dup2' segfaults on Cygwin 6.1 postInstall = "rm $out/bin/gawk-*"; |