2022-05-18 14:49:53 +00:00
|
|
|
{ lib, stdenv, fetchurl, getopt, util-linuxMinimal, which, gperf, nix-update-script }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libseccomp";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "2.5.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/seccomp/libseccomp/releases/download/v${version}/libseccomp-${version}.tar.gz";
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-JIosik2bmFiqa69ScSw0r+/PnJ6Ut23OAsHJqiX7M3U=";
|
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 .
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ util-linuxMinimal which ];
|
2022-05-18 14:49:53 +00:00
|
|
|
doCheck = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# 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 = {
|
2022-12-28 21:21:41 +00:00
|
|
|
updateScript = nix-update-script { };
|
2022-01-26 04:04:25 +00:00
|
|
|
};
|
|
|
|
|
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";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "scmp_sys_resolver";
|
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"
|
2023-04-29 16:46:19 +00:00
|
|
|
"loongarch64-linux"
|
2024-01-02 11:29:13 +00:00
|
|
|
"m68k-linux"
|
|
|
|
"microblaze-linux"
|
|
|
|
"microblazeel-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 ];
|
|
|
|
};
|
|
|
|
}
|