From 1729975ffc93affec069edb099a3127e7759e19a Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 11 Jan 2023 00:43:44 +0000 Subject: [PATCH] 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 --- pkgs/tools/text/gawk/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/text/gawk/default.nix b/pkgs/tools/text/gawk/default.nix index f07da96aa48..a85e91b1a0c 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" ]; +})