2022-01-26 04:04:25 +00:00
|
|
|
{ lib, stdenv, fetchurl, getopt, util-linux, gperf, nix-update-script }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libseccomp";
|
2022-01-26 04:04:25 +00:00
|
|
|
version = "2.5.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/seccomp/libseccomp/releases/download/v${version}/libseccomp-${version}.tar.gz";
|
2022-01-26 04:04:25 +00:00
|
|
|
sha256 = "sha256-WQZchzM2RyXpchukjDqZu8Uq+SHa9I30seAS+8exCnY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-12-03 08:41:04 +00:00
|
|
|
outputs = [ "out" "lib" "dev" "man" "pythonsrc" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
nativeBuildInputs = [ gperf ];
|
|
|
|
buildInputs = [ getopt ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
|
|
|
|
2020-11-24 20:58:05 +00:00
|
|
|
checkInputs = [ util-linux ];
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = false; # dependency cycle
|
|
|
|
|
|
|
|
# Hack to ensure that patchelf --shrink-rpath get rids of a $TMPDIR reference.
|
|
|
|
preFixup = "rm -rfv src";
|
|
|
|
|
2020-12-03 08:41:04 +00:00
|
|
|
# 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/
|
2020-12-25 13:55:36 +00:00
|
|
|
tar -zcf $pythonsrc --mtime="@$SOURCE_DATE_EPOCH" --sort=name --transform s/tmp-pythonsrc/python-foundationdb/ ./tmp-pythonsrc/
|
2020-12-03 08:41:04 +00:00
|
|
|
'';
|
|
|
|
|
2022-01-26 04:04:25 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script {
|
|
|
|
attrPath = pname;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "High level library for the Linux Kernel seccomp filter";
|
2020-09-25 04:45:31 +00:00
|
|
|
homepage = "https://github.com/seccomp/libseccomp";
|
2021-12-06 16:07:01 +00:00
|
|
|
license = licenses.lgpl21Only;
|
2020-09-25 04:45:31 +00:00
|
|
|
platforms = platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
badPlatforms = [
|
|
|
|
"alpha-linux"
|
2020-09-25 04:45:31 +00:00
|
|
|
"riscv32-linux"
|
|
|
|
"sparc-linux"
|
|
|
|
"sparc64-linux"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
maintainers = with maintainers; [ thoughtpolice ];
|
|
|
|
};
|
|
|
|
}
|