mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 23:36:16 +02:00
Merge pull request #10591 from Ma27/require-libseccomp-2.5.5
Require at least libseccomp 2.5.5
This commit is contained in:
commit
df424667a3
2 changed files with 19 additions and 1 deletions
11
configure.ac
11
configure.ac
|
@ -317,6 +317,17 @@ case "$host_os" in
|
||||||
[CXXFLAGS="$LIBSECCOMP_CFLAGS $CXXFLAGS"])
|
[CXXFLAGS="$LIBSECCOMP_CFLAGS $CXXFLAGS"])
|
||||||
have_seccomp=1
|
have_seccomp=1
|
||||||
AC_DEFINE([HAVE_SECCOMP], [1], [Whether seccomp is available and should be used for sandboxing.])
|
AC_DEFINE([HAVE_SECCOMP], [1], [Whether seccomp is available and should be used for sandboxing.])
|
||||||
|
AC_COMPILE_IFELSE([
|
||||||
|
AC_LANG_SOURCE([[
|
||||||
|
#include <seccomp.h>
|
||||||
|
#ifndef __SNR_fchmodat2
|
||||||
|
# error "Missing support for fchmodat2"
|
||||||
|
#endif
|
||||||
|
]])
|
||||||
|
], [], [
|
||||||
|
echo "libseccomp is missing __SNR_fchmodat2. Please provide libseccomp 2.5.5 or later"
|
||||||
|
exit 1
|
||||||
|
])
|
||||||
else
|
else
|
||||||
have_seccomp=
|
have_seccomp=
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{ lib
|
{ lib
|
||||||
|
, fetchurl
|
||||||
, stdenv
|
, stdenv
|
||||||
, releaseTools
|
, releaseTools
|
||||||
, autoconf-archive
|
, autoconf-archive
|
||||||
|
@ -248,7 +249,13 @@ in {
|
||||||
] ++ lib.optionals buildUnitTests [
|
] ++ lib.optionals buildUnitTests [
|
||||||
gtest
|
gtest
|
||||||
rapidcheck
|
rapidcheck
|
||||||
] ++ lib.optional stdenv.isLinux libseccomp
|
] ++ lib.optional stdenv.isLinux (libseccomp.overrideAttrs (_: rec {
|
||||||
|
version = "2.5.5";
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://github.com/seccomp/libseccomp/releases/download/v${version}/libseccomp-${version}.tar.gz";
|
||||||
|
hash = "sha256-JIosik2bmFiqa69ScSw0r+/PnJ6Ut23OAsHJqiX7M3U=";
|
||||||
|
};
|
||||||
|
}))
|
||||||
++ lib.optional stdenv.hostPlatform.isx86_64 libcpuid
|
++ lib.optional stdenv.hostPlatform.isx86_64 libcpuid
|
||||||
# There have been issues building these dependencies
|
# There have been issues building these dependencies
|
||||||
++ lib.optional (stdenv.hostPlatform == stdenv.buildPlatform && (stdenv.isLinux || stdenv.isDarwin))
|
++ lib.optional (stdenv.hostPlatform == stdenv.buildPlatform && (stdenv.isLinux || stdenv.isDarwin))
|
||||||
|
|
Loading…
Reference in a new issue