crun: 1.8.3 -> 1.8.4
[NixPkgs.git] / pkgs / tools / networking / ntp / default.nix
blobf272470a98f411dee68de3ec40a5ad1b37c16953
1 { stdenv, lib, fetchurl, openssl, perl, pps-tools, libcap }:
3 stdenv.mkDerivation rec {
4   pname = "ntp";
5   version = "4.2.8p15";
7   src = fetchurl {
8     url = "https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${lib.versions.majorMinor version}/ntp-${version}.tar.gz";
9     sha256 = "06cwhimm71safmwvp6nhxp6hvxsg62whnbgbgiflsqb8mgg40n7n";
10   };
12   patches = [
13     # From https://patchwork.openembedded.org/patch/180019/
14     ./glibc-2.34-fix.patch
15   ];
17   configureFlags = [
18     "--sysconfdir=/etc"
19     "--localstatedir=/var"
20     "--with-openssl-libdir=${lib.getLib openssl}/lib"
21     "--with-openssl-incdir=${openssl.dev}/include"
22     "--enable-ignore-dns-errors"
23     "--with-yielding-select=yes"
24   ] ++ lib.optional stdenv.isLinux "--enable-linuxcaps";
26   buildInputs = [ openssl perl ]
27     ++ lib.optionals stdenv.isLinux [ pps-tools libcap ];
29   hardeningEnable = [ "pie" ];
31   postInstall = ''
32     rm -rf $out/share/doc
33   '';
35   meta = with lib; {
36     homepage = "http://www.ntp.org/";
37     description = "An implementation of the Network Time Protocol";
38     license = {
39       # very close to isc and bsd2
40       url = "https://www.eecis.udel.edu/~mills/ntp/html/copyright.html";
41     };
42     maintainers = with maintainers; [ eelco thoughtpolice ];
43     platforms = platforms.unix;
44   };