nixpkgs/pkgs/by-name/re/reaction/package.nix
nicoo 2641d97cbf pkgs/by-name: Convert hashes to SRI format
Reproduction script:
	# Bulk rewrite
	./maintainers/scripts/sha-to-sri.py pkgs/by-name
	# Revert some packages which will need manual intervention
	for n in amdvlk azure-cli cargo-profiler corefonts flatito fluxcd gist perf_data_converter protoc-gen-js solana-cli swt verible; do
		git checkout -- "pkgs/by-name/${n:0:2}/${n}"
	done
2024-09-15 11:24:31 +02:00

46 lines
1018 B
Nix

{
lib,
buildGoModule,
fetchFromGitLab,
}:
let
version = "1.4.1";
in buildGoModule {
inherit version;
pname = "reaction";
src = fetchFromGitLab {
domain = "framagit.org";
owner = "ppom";
repo = "reaction";
rev = "v${version}";
hash = "sha256-UL3ck+gejZAu/mZS3ZiZ78a2/I+OesaSRZUhHirgu9o=";
};
vendorHash = "sha256-THUIoWFzkqaTofwH4clBgsmtUlLS9WIB2xjqW7vkhpg=";
ldflags = [
"-X main.version=${version}"
"-X main.commit=unknown"
];
postBuild = ''
$CC helpers_c/ip46tables.c -o ip46tables
$CC helpers_c/nft46.c -o nft46
'';
postInstall = ''
cp ip46tables nft46 $out/bin
'';
meta = with lib; {
description = "Scan logs and take action: an alternative to fail2ban";
homepage = "https://framagit.org/ppom/reaction";
changelog = "https://framagit.org/ppom/reaction/-/releases/v${version}";
license = licenses.agpl3Plus;
mainProgram = "reaction";
maintainers = with maintainers; [ppom];
platforms = platforms.unix;
};
}