git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commit2d679dbe745e05e62a0f14c0fad12f83f3d4e2b3 authorTuomas Tynkkynen <tuomas@tuxera.com> dateSat 26 Nov 2016, 20:38 (10 years ago) parente24df8e
1 file changed+8−6
pkgs/tools/networking/ntp/default.nix+8−6
pkgs/tools/networking/ntp/default.nix+8−6
@@ -1,8 +1,12 @@
1−{ stdenv, fetchurl, openssl, perl, libcap ? null, libseccomp ? null }:
1+{ stdenv, lib, fetchurl, openssl, perl, libcap ? null, libseccomp ? null }:
22
33assert stdenv.isLinux -> libcap != null;
44assert stdenv.isLinux -> libseccomp != null;
55
6+let
7+ withSeccomp = stdenv.isLinux && (stdenv.isi686 || stdenv.isx86_64);
8+in
9+
610stdenv.mkDerivation rec {
711 name = "ntp-4.2.8p9";
812
@@ -17,12 +21,10 @@ stdenv.mkDerivation rec {
1721 "--with-openssl-libdir=${openssl.out}/lib"
1822 "--with-openssl-incdir=${openssl.dev}/include"
1923 "--enable-ignore-dns-errors"
20− ] ++ stdenv.lib.optionals stdenv.isLinux [
21− "--enable-linuxcaps"
22− "--enable-libseccomp"
23− ];
24+ ] ++ stdenv.lib.optional stdenv.isLinux "--enable-linuxcaps"
25+ ++ stdenv.lib.optional withSeccomp "--enable-libseccomp";
2426
25− buildInputs = [ libcap openssl libseccomp perl ];
27+ buildInputs = [ libcap openssl perl ] ++ lib.optional withSeccomp libseccomp;
2628
2729 hardeningEnable = [ "pie" ];
2830