From ee0d559dae1bd2bdf3591b3efc5ce832ebbf2b1d Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Tue, 1 Sep 2020 17:44:55 +1000 Subject: oci-seccomp-bpf-hook: move to linuxPackages --- .../oci-seccomp-bpf-hook/default.nix | 58 ---------------------- .../linux/oci-seccomp-bpf-hook/default.nix | 58 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 +- 3 files changed, 60 insertions(+), 60 deletions(-) delete mode 100644 pkgs/applications/virtualization/oci-seccomp-bpf-hook/default.nix create mode 100644 pkgs/os-specific/linux/oci-seccomp-bpf-hook/default.nix (limited to 'pkgs') diff --git a/pkgs/applications/virtualization/oci-seccomp-bpf-hook/default.nix b/pkgs/applications/virtualization/oci-seccomp-bpf-hook/default.nix deleted file mode 100644 index 0e97a7c36464d..0000000000000 --- a/pkgs/applications/virtualization/oci-seccomp-bpf-hook/default.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ 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" ]; - }; -} diff --git a/pkgs/os-specific/linux/oci-seccomp-bpf-hook/default.nix b/pkgs/os-specific/linux/oci-seccomp-bpf-hook/default.nix new file mode 100644 index 0000000000000..3247e8c4eda56 --- /dev/null +++ b/pkgs/os-specific/linux/oci-seccomp-bpf-hook/default.nix @@ -0,0 +1,58 @@ +{ stdenv +, buildGoModule +, fetchFromGitHub +, go-md2man +, installShellFiles +, pkg-config +, bcc +, libseccomp +}: + +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 = [ + bcc + libseccomp + ]; + + 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" ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f99911a862128..b7f9053ca1c89 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17782,6 +17782,8 @@ in netatop = callPackage ../os-specific/linux/netatop { }; + oci-seccomp-bpf-hook = if stdenv.lib.versionAtLeast kernel.version "5.4" then callPackage ../os-specific/linux/oci-seccomp-bpf-hook { } else null; + perf = callPackage ../os-specific/linux/kernel/perf.nix { }; phc-intel = if stdenv.lib.versionAtLeast kernel.version "4.10" then callPackage ../os-specific/linux/phc-intel { } else null; @@ -24872,8 +24874,6 @@ in nxengine-evo = callPackage ../games/nxengine-evo { }; - oci-seccomp-bpf-hook = callPackage ../applications/virtualization/oci-seccomp-bpf-hook { }; - odamex = callPackage ../games/odamex { }; oilrush = callPackage ../games/oilrush { }; -- cgit 1.4.1