mawk: fix passthru.tests, relax hardening options

`nix-build -A mawk.passthru.tests` was previously failing:
> error: builder for '/nix/store/gc20k2mizdw3aacda6nqwyvi7kqzn1dh-mawk-1.3.4-20240819-test-version.drv' failed with exit code 1;
>        last 2 log lines:
>        > mawk -W version returned a non-zero exit code.
>        > *** buffer overflow detected ***: terminated

the `mawk` binary was unusable; would crash on *any* invocation.

context: <https://github.com/NixOS/nixpkgs/pull/533402#issuecomment-4960077454>
This commit is contained in:
Colin
2026-07-18 08:26:56 +00:00
parent 6bfaf02a46
commit aa630e7f14
+5
View File
@@ -21,10 +21,15 @@ stdenv.mkDerivation (finalAttrs: {
depsBuildBuild = [ buildPackages.stdenv.cc ];
hardeningDisable = [
"strictflexarrays1"
];
passthru = {
tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
command = "mawk -W version";
version = lib.replaceString "-" " " finalAttrs.version;
};
updateScript = directoryListingUpdater {
inherit (finalAttrs) pname version;