aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/libraries/libseccomp
diff options
context:
space:
mode:
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/development/libraries/libseccomp')
-rw-r--r--infra/libkookie/nixpkgs/pkgs/development/libraries/libseccomp/default.nix47
1 files changed, 47 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/development/libraries/libseccomp/default.nix b/infra/libkookie/nixpkgs/pkgs/development/libraries/libseccomp/default.nix
new file mode 100644
index 000000000000..ab1df8d2bc12
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/development/libraries/libseccomp/default.nix
@@ -0,0 +1,47 @@
+{ stdenv, fetchurl, getopt, util-linux, gperf }:
+
+stdenv.mkDerivation rec {
+ pname = "libseccomp";
+ version = "2.5.1";
+
+ src = fetchurl {
+ url = "https://github.com/seccomp/libseccomp/releases/download/v${version}/libseccomp-${version}.tar.gz";
+ sha256 = "0m8dlg1v7kflcxvajs4p76p275qwsm2abbf5mfapkakp7hw7wc7f";
+ };
+
+ outputs = [ "out" "lib" "dev" "man" "pythonsrc" ];
+
+ nativeBuildInputs = [ gperf ];
+ buildInputs = [ getopt ];
+
+ patchPhase = ''
+ patchShebangs .
+ '';
+
+ checkInputs = [ util-linux ];
+ doCheck = false; # dependency cycle
+
+ # Hack to ensure that patchelf --shrink-rpath get rids of a $TMPDIR reference.
+ preFixup = "rm -rfv src";
+
+ # Copy the python module code into a tarball that we can export and use as the
+ # src input for buildPythonPackage calls
+ postInstall = ''
+ cp -R ./src/python/ tmp-pythonsrc/
+ tar -zcf $pythonsrc --transform s/tmp-pythonsrc/python-foundationdb/ ./tmp-pythonsrc/
+ '';
+
+ meta = with stdenv.lib; {
+ description = "High level library for the Linux Kernel seccomp filter";
+ homepage = "https://github.com/seccomp/libseccomp";
+ license = licenses.lgpl21;
+ platforms = platforms.linux;
+ badPlatforms = [
+ "alpha-linux"
+ "riscv32-linux"
+ "sparc-linux"
+ "sparc64-linux"
+ ];
+ maintainers = with maintainers; [ thoughtpolice ];
+ };
+}