diff options
author | Robin Gloster <mail@glob.in> | 2016-04-18 13:00:40 +0000 |
---|---|---|
committer | Robin Gloster <mail@glob.in> | 2016-04-18 13:49:22 +0000 |
commit | d020caa5b2eca90ea051403fbb4c52b99ee071b9 (patch) | |
tree | ba44ef1e784bca89e0df6b249956fd035b1d86e3 /pkgs/tools/text/gawk/default.nix | |
parent | 3e68106afd95df012ddb548575f0133681687a90 (diff) | |
parent | 0729f606973870c03d21bb2f21b70d91216943ca (diff) |
Merge remote-tracking branch 'upstream/master' into hardened-stdenv
Diffstat (limited to 'pkgs/tools/text/gawk/default.nix')
-rw-r--r-- | pkgs/tools/text/gawk/default.nix | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/pkgs/tools/text/gawk/default.nix b/pkgs/tools/text/gawk/default.nix index e2856b7acaa4b..8578960b98753 100644 --- a/pkgs/tools/text/gawk/default.nix +++ b/pkgs/tools/text/gawk/default.nix @@ -1,6 +1,9 @@ -{ stdenv, fetchurl, libsigsegv, readline, readlineSupport ? false +{ stdenv, fetchurl, xz, libsigsegv, readline, interactive ? false , locale ? null }: +let + inherit (stdenv.lib) optional; +in stdenv.mkDerivation rec { name = "gawk-4.1.3"; @@ -9,6 +12,9 @@ stdenv.mkDerivation rec { sha256 = "09d6pmx6h3i2glafm0jd1v1iyrs03vcyv2rkz12jisii3vlmbkz3"; }; + # When we do build separate interactive version, it makes sense to always include man. + outputs = [ "out" "info" ] ++ stdenv.lib.optional (!interactive) "man"; + doCheck = !( stdenv.isCygwin # XXX: `test-dup2' segfaults on Cygwin 6.1 || stdenv.isDarwin # XXX: `locale' segfaults @@ -16,18 +22,17 @@ stdenv.mkDerivation rec { || stdenv.isFreeBSD ); - buildInputs = stdenv.lib.optional (stdenv.system != "x86_64-cygwin") libsigsegv - ++ stdenv.lib.optional readlineSupport readline + buildInputs = [ xz.bin ] + ++ stdenv.lib.optional (stdenv.system != "x86_64-cygwin") libsigsegv + ++ stdenv.lib.optional interactive readline ++ stdenv.lib.optional stdenv.isDarwin locale; configureFlags = stdenv.lib.optional (stdenv.system != "x86_64-cygwin") "--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")]; postInstall = "rm $out/bin/gawk-*"; - meta = { + meta = with stdenv.lib; { homepage = http://www.gnu.org/software/gawk/; description = "GNU implementation of the Awk programming language"; @@ -45,8 +50,11 @@ stdenv.mkDerivation rec { lines of code. ''; - license = stdenv.lib.licenses.gpl3Plus; + license = licenses.gpl3Plus; + + platforms = platforms.unix; maintainers = [ ]; }; } + |