From 67fd21a170daac003c8b87c43b3eeeb5a81f28ac Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Mon, 21 Nov 2016 23:11:05 +0100 Subject: [PATCH] ntp: use seccomp on linux --- pkgs/tools/networking/ntp/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/networking/ntp/default.nix b/pkgs/tools/networking/ntp/default.nix index 07602fec6ae..445cb1fb393 100644 --- a/pkgs/tools/networking/ntp/default.nix +++ b/pkgs/tools/networking/ntp/default.nix @@ -1,6 +1,7 @@ -{ stdenv, fetchurl, autoreconfHook, libcap ? null, openssl ? null }: +{ stdenv, fetchurl, openssl, libcap ? null, libseccomp ? null }: assert stdenv.isLinux -> libcap != null; +assert stdenv.isLinux -> libseccomp != null; stdenv.mkDerivation rec { name = "ntp-4.2.8p9"; @@ -16,10 +17,12 @@ stdenv.mkDerivation rec { "--with-openssl-libdir=${openssl.out}/lib" "--with-openssl-incdir=${openssl.dev}/include" "--enable-ignore-dns-errors" - ] ++ stdenv.lib.optional (libcap != null) "--enable-linuxcaps"; + ] ++ stdenv.lib.optionals stdenv.isLinux [ + "--enable-linuxcaps" + "--enable-libseccomp" + ]; - nativeBuildInputs = [ autoreconfHook ]; - buildInputs = [ libcap openssl ]; + buildInputs = [ libcap openssl libseccomp ]; hardeningEnable = [ "pie" ];