diff options
author | Sascha Grunert <sgrunert@suse.com> | 2020-08-17 10:39:20 +0200 |
---|---|---|
committer | zowoq <59103226+zowoq@users.noreply.github.com> | 2020-08-21 19:13:50 +1000 |
commit | e48ddd2270d77678a7890cb5c25f8f3a5cde42b9 (patch) | |
tree | 2647ecd28cce70a3ed7dc78f21a08abfa3a388c4 /pkgs/applications/virtualization | |
parent | 718782b004f3fbe79e1128e432bf41bdab3b4eb4 (diff) |
oci-seccomp-bpf-hook: new at 1.2.0
Add a new package for the OCI seccomp BPF hook package. Signed-off-by: Sascha Grunert <sgrunert@suse.com>
Diffstat (limited to 'pkgs/applications/virtualization')
-rw-r--r-- | pkgs/applications/virtualization/oci-seccomp-bpf-hook/default.nix | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/pkgs/applications/virtualization/oci-seccomp-bpf-hook/default.nix b/pkgs/applications/virtualization/oci-seccomp-bpf-hook/default.nix new file mode 100644 index 0000000000000..0e97a7c36464d --- /dev/null +++ b/pkgs/applications/virtualization/oci-seccomp-bpf-hook/default.nix @@ -0,0 +1,58 @@ +{ stdenv +, buildGoModule +, fetchFromGitHub +, go-md2man +, installShellFiles +, libseccomp +, linuxPackages +, pkg-config +}: + +buildGoModule rec { + pname = "oci-seccomp-bpf-hook"; + version = "1.2.0"; + src = fetchFromGitHub { + owner = "containers"; + repo = "oci-seccomp-bpf-hook"; + rev = "v${version}"; + sha256 = "143x4daixzhhhpli1l14r7dr7dn3q42w8dddr16jzhhwighsirqw"; + }; + vendorSha256 = null; + doCheck = false; + + outputs = [ "out" "man" ]; + nativeBuildInputs = [ + go-md2man + installShellFiles + pkg-config + ]; + buildInputs = [ + libseccomp + linuxPackages.bcc + ]; + + 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 stdenv.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" ]; + }; +} |