nixpkgs/pkgs/tools/text/goawk/default.nix
Alexis Hildebrandt 755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00

44 lines
1.0 KiB
Nix

{ buildGoModule, fetchFromGitHub, lib, stdenv, gawk }:
buildGoModule rec {
pname = "goawk";
version = "1.27.0";
src = fetchFromGitHub {
owner = "benhoyt";
repo = "goawk";
rev = "v${version}";
hash = "sha256-KB9N345xkgsPfI4DQYFag7qSdFv/JSU18YG8IPFrcQA=";
};
vendorHash = null;
nativeCheckInputs = [ 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 = "POSIX-compliant AWK interpreter written in Go";
homepage = "https://benhoyt.com/writings/goawk/";
license = licenses.mit;
mainProgram = "goawk";
maintainers = with maintainers; [ abbe ];
};
}