3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/os-specific/linux/oci-seccomp-bpf-hook/default.nix
Sascha Grunert 057a240b0b
linuxPackages.oci-seccomp-bpf-hook: 1.2.0 -> 1.2.1
Signed-off-by: Sascha Grunert <mail@saschagrunert.de>
2021-01-27 15:37:55 +01:00

62 lines
1.2 KiB
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, go-md2man
, installShellFiles
, pkg-config
, bcc
, libseccomp
}:
buildGoModule rec {
pname = "oci-seccomp-bpf-hook";
version = "1.2.1";
src = fetchFromGitHub {
owner = "containers";
repo = "oci-seccomp-bpf-hook";
rev = "v${version}";
sha256 = "0zbrpv6j4gd4l36zl2dljazdm85qlqwchf0xvmnaywcj8c8b49xw";
};
vendorSha256 = null;
outputs = [ "out" "man" ];
nativeBuildInputs = [
go-md2man
installShellFiles
pkg-config
];
buildInputs = [
bcc
libseccomp
];
checkPhase = ''
go test -v ./...
'';
buildPhase = ''
make
'';
postBuild = ''
substituteInPlace oci-seccomp-bpf-hook.json --replace HOOK_BIN_DIR "$out/bin"
'';
installPhase = ''
install -Dm755 bin/* -t $out/bin
install -Dm644 oci-seccomp-bpf-hook.json -t $out
installManPage docs/*.[1-9]
'';
meta = with lib; {
homepage = "https://github.com/containers/oci-seccomp-bpf-hook";
description = ''
OCI hook to trace syscalls and generate a seccomp profile
'';
license = licenses.asl20;
maintainers = with maintainers; [ saschagrunert ];
platforms = platforms.linux;
badPlatforms = [ "aarch64-linux" ];
};
}