`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>
49 lines
1.2 KiB
Nix
49 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
buildPackages,
|
|
directoryListingUpdater,
|
|
fetchurl,
|
|
stdenv,
|
|
testers,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "mawk";
|
|
version = "1.3.4-20240819";
|
|
|
|
src = fetchurl {
|
|
urls = [
|
|
"https://invisible-mirror.net/archives/mawk/mawk-${finalAttrs.version}.tgz"
|
|
"https://invisible-island.net/archives/mawk/mawk-${finalAttrs.version}.tgz"
|
|
];
|
|
hash = "sha256-bh/ejuetilwVOCMWhj/WtMbSP6t4HdWrAXf/o+6arlw=";
|
|
};
|
|
|
|
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;
|
|
url = "https://invisible-island.net/archives/mawk/";
|
|
};
|
|
};
|
|
|
|
meta = {
|
|
homepage = "https://invisible-island.net/mawk/mawk.html";
|
|
changelog = "https://invisible-island.net/mawk/CHANGES";
|
|
description = "Interpreter for the AWK Programming Language";
|
|
license = lib.licenses.gpl2Only;
|
|
mainProgram = "mawk";
|
|
platforms = lib.platforms.unix;
|
|
};
|
|
})
|