2022-04-05 23:09:08 +02:00
|
|
|
{ buildGoModule, fetchFromGitHub, lib, stdenv }:
|
|
|
|
|
2022-02-05 12:15:18 +01:00
|
|
|
buildGoModule rec {
|
|
|
|
pname = "goawk";
|
2022-05-21 05:15:36 +02:00
|
|
|
version = "1.18.0";
|
2022-02-05 12:15:18 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "benhoyt";
|
|
|
|
repo = "goawk";
|
|
|
|
rev = "v${version}";
|
2022-05-21 05:15:36 +02:00
|
|
|
sha256 = "sha256-kRakQo18qOzrlvsAKtKTHEacUxDfoWyMmtiM7d5WCvQ=";
|
2022-02-05 12:15:18 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
vendorSha256 = "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo=";
|
|
|
|
|
2022-04-05 23:09:08 +02:00
|
|
|
postPatch = ''
|
2022-05-21 05:15:36 +02:00
|
|
|
substituteInPlace goawk_test.go \
|
|
|
|
--replace "TestCommandLine" "SkipCommandLine" \
|
|
|
|
--replace "TestDevStdout" "SkipDevStdout" \
|
|
|
|
--replace "TestFILENAME" "SkipFILENAME" \
|
|
|
|
--replace "TestWildcards" "SkipWildcards"
|
|
|
|
|
2022-04-05 23:09:08 +02:00
|
|
|
substituteInPlace interp/interp_test.go \
|
|
|
|
--replace "TestShellCommand" "SkipShellCommand"
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = (stdenv.system != "aarch64-darwin");
|
2022-02-05 12:15:18 +01:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|