nixpkgs/pkgs/development/libraries/libseccomp/default.nix

48 lines
1.4 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, getopt, util-linux, gperf }:
stdenv.mkDerivation rec {
pname = "libseccomp";
2020-11-22 02:40:34 +00:00
version = "2.5.1";
2015-05-22 14:49:27 +01:00
src = fetchurl {
url = "https://github.com/seccomp/libseccomp/releases/download/v${version}/libseccomp-${version}.tar.gz";
2020-11-22 02:40:34 +00:00
sha256 = "0m8dlg1v7kflcxvajs4p76p275qwsm2abbf5mfapkakp7hw7wc7f";
};
outputs = [ "out" "lib" "dev" "man" "pythonsrc" ];
2018-02-22 14:15:55 +00:00
nativeBuildInputs = [ gperf ];
buildInputs = [ getopt ];
2015-03-27 00:54:08 +00:00
patchPhase = ''
2015-03-27 00:54:08 +00:00
patchShebangs .
'';
2020-11-24 15:29:28 +00:00
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 --mtime="@$SOURCE_DATE_EPOCH" --sort=name --transform s/tmp-pythonsrc/python-foundationdb/ ./tmp-pythonsrc/
'';
meta = with 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 ];
};
}