Only build libseccomp on supported systems

wip/yesman
Shea Levy 6 years ago
parent 1c1a6dfd23
commit 3c57e770cf
No known key found for this signature in database
GPG Key ID: 5C0BD6957D86FE27
  1. 2
      lib/systems/inspect.nix
  2. 4
      pkgs/tools/package-management/nix/default.nix
  3. 4
      pkgs/top-level/all-packages.nix

@ -40,6 +40,8 @@ rec {
[ "x86" "arm" "aarch64" "mips" ];
Efi = map (family: { cpu.family = family; })
[ "x86" "arm" "aarch64" ];
Seccomputable = map (family: { kernel = kernels.linux; cpu.family = family; })
[ "x86" "arm" "aarch64" "mips" ];
};
matchAnyAttrs = patterns:

@ -30,7 +30,7 @@ let
buildInputs = [ curl openssl sqlite xz bzip2 ]
++ lib.optional (stdenv.isLinux || stdenv.isDarwin) libsodium
++ lib.optionals fromGit [ brotli ] # Since 1.12
++ lib.optional (stdenv.isLinux && !hostPlatform.isRiscV) libseccomp
++ lib.optional (hostPlatform.isSeccomputable) libseccomp
++ lib.optional ((stdenv.isLinux || stdenv.isDarwin) && is20)
(aws-sdk-cpp.override {
apis = ["s3"];
@ -57,7 +57,7 @@ let
hostPlatform != buildPlatform && hostPlatform ? nix && hostPlatform.nix ? system
) ''--with-system=${hostPlatform.nix.system}''
# RISC-V support in progress https://github.com/seccomp/libseccomp/pull/50
++ lib.optional hostPlatform.isRiscV "--disable-seccomp-sandboxing";
++ lib.optional (!hostPlatform.isSeccomputable) "--disable-seccomp-sandboxing";
makeFlags = "profiledir=$(out)/etc/profile.d";

@ -9644,7 +9644,9 @@ with pkgs;
libgroove = callPackage ../development/libraries/libgroove { };
libseccomp = callPackage ../development/libraries/libseccomp { };
libseccomp = if hostPlatform.isSeccomputable
then callPackage ../development/libraries/libseccomp { }
else null;
libsecret = callPackage ../development/libraries/libsecret { };

Loading…
Cancel
Save