ntp: Don't use seccomp on non-x86
It only has the allowed system call numbers defined for i386 and x86_64 so it fails to build otherwise.
This commit is contained in:
parent
e24df8ea69
commit
2d679dbe74
@ -1,8 +1,12 @@
|
|||||||
{ stdenv, fetchurl, openssl, perl, libcap ? null, libseccomp ? null }:
|
{ stdenv, lib, fetchurl, openssl, perl, libcap ? null, libseccomp ? null }:
|
||||||
|
|
||||||
assert stdenv.isLinux -> libcap != null;
|
assert stdenv.isLinux -> libcap != null;
|
||||||
assert stdenv.isLinux -> libseccomp != null;
|
assert stdenv.isLinux -> libseccomp != null;
|
||||||
|
|
||||||
|
let
|
||||||
|
withSeccomp = stdenv.isLinux && (stdenv.isi686 || stdenv.isx86_64);
|
||||||
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "ntp-4.2.8p9";
|
name = "ntp-4.2.8p9";
|
||||||
|
|
||||||
@ -17,12 +21,10 @@ stdenv.mkDerivation rec {
|
|||||||
"--with-openssl-libdir=${openssl.out}/lib"
|
"--with-openssl-libdir=${openssl.out}/lib"
|
||||||
"--with-openssl-incdir=${openssl.dev}/include"
|
"--with-openssl-incdir=${openssl.dev}/include"
|
||||||
"--enable-ignore-dns-errors"
|
"--enable-ignore-dns-errors"
|
||||||
] ++ stdenv.lib.optionals stdenv.isLinux [
|
] ++ stdenv.lib.optional stdenv.isLinux "--enable-linuxcaps"
|
||||||
"--enable-linuxcaps"
|
++ stdenv.lib.optional withSeccomp "--enable-libseccomp";
|
||||||
"--enable-libseccomp"
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = [ libcap openssl libseccomp perl ];
|
buildInputs = [ libcap openssl perl ] ++ lib.optional withSeccomp libseccomp;
|
||||||
|
|
||||||
hardeningEnable = [ "pie" ];
|
hardeningEnable = [ "pie" ];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user