02cf88bb76
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
43 lines
1.1 KiB
Nix
43 lines
1.1 KiB
Nix
{ buildGoModule, fetchFromGitHub, lib, stdenv, gawk }:
|
|
|
|
buildGoModule rec {
|
|
pname = "goawk";
|
|
version = "1.20.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "benhoyt";
|
|
repo = "goawk";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-omUtMNB8VBTbihy+VksCduvOENhtPApPBwUIxjVL9fI=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo=";
|
|
|
|
checkInputs = [ gawk ];
|
|
|
|
postPatch = ''
|
|
substituteInPlace goawk_test.go \
|
|
--replace "TestCommandLine" "SkipCommandLine" \
|
|
--replace "TestDevStdout" "SkipDevStdout" \
|
|
--replace "TestFILENAME" "SkipFILENAME" \
|
|
--replace "TestWildcards" "SkipWildcards"
|
|
|
|
substituteInPlace interp/interp_test.go \
|
|
--replace "TestShellCommand" "SkipShellCommand"
|
|
'';
|
|
|
|
checkFlags = [
|
|
"-awk"
|
|
"${gawk}/bin/gawk"
|
|
];
|
|
|
|
doCheck = (stdenv.system != "aarch64-darwin");
|
|
|
|
meta = with lib; {
|
|
description = "A POSIX-compliant AWK interpreter written in Go";
|
|
homepage = "https://benhoyt.com/writings/goawk/";
|
|
license = licenses.mit;
|
|
mainProgram = "goawk";
|
|
maintainers = with maintainers; [ abbe ];
|
|
};
|
|
}
|