about summary refs log tree commit diff
path: root/pkgs/tools/text/gawk
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-01-11 00:43:44 +0000
committerAlyssa Ross <hi@alyssa.is>2023-01-11 18:24:19 +0000
commit1729975ffc93affec069edb099a3127e7759e19a (patch)
tree60cd832c32489bb4bb1c1a30b6d089973989af0d /pkgs/tools/text/gawk
parent33aa224777a5077ff1dfa4c8f4653d8aab268d76 (diff)
gawk: disable PIE
PIE is incompatible with gawk's new persistent memory feature.
This fixes pkgsMusl.gawk.

Fixes: 3fba3bf53f2 ("gawk: 5.1.1 -> 5.2.1")
Fixes: https://github.com/NixOS/nixpkgs/pull/210124
Diffstat (limited to 'pkgs/tools/text/gawk')
-rw-r--r--pkgs/tools/text/gawk/default.nix8
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/tools/text/gawk/default.nix b/pkgs/tools/text/gawk/default.nix
index f07da96aa48b7..a85e91b1a0c16 100644
--- a/pkgs/tools/text/gawk/default.nix
+++ b/pkgs/tools/text/gawk/default.nix
@@ -16,7 +16,7 @@
 
 assert (doCheck && stdenv.isLinux) -> glibcLocales != null;
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (rec {
   pname = "gawk" + lib.optionalString interactive "-interactive";
   version = "5.2.1";
 
@@ -83,4 +83,8 @@ stdenv.mkDerivation rec {
     platforms = platforms.unix ++ platforms.windows;
     maintainers = [ ];
   };
-}
+} // lib.optionalAttrs stdenv.hostPlatform.isMusl {
+  # PIE is incompatible with the "persistent malloc" ("pma") feature.
+  # FIXME: make unconditional in staging (added to avoid rebuilds in staging-next)
+  hardeningDisable = [ "pie" ];
+})