forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / by-name / nt / ntp / package.nix
blob2321455b8bbb2ac2d16b9188083a3743097ffdfb
1 { stdenv, lib, fetchurl, openssl, perl, pps-tools, libcap }:
3 stdenv.mkDerivation rec {
4   pname = "ntp";
5   version = "4.2.8p18";
7   src = fetchurl {
8     url = "https://archive.ntp.org/ntp4/ntp-${lib.versions.majorMinor version}/ntp-${version}.tar.gz";
9     hash = "sha256-z4TF8/saKVKElCYk2CP/+mNBROCWz8T5lprJjvX0aOU=";
10   };
12   configureFlags = [
13     "--sysconfdir=/etc"
14     "--localstatedir=/var"
15     "--with-openssl-libdir=${lib.getLib openssl}/lib"
16     "--with-openssl-incdir=${openssl.dev}/include"
17     "--enable-ignore-dns-errors"
18     "--with-yielding-select=yes"
19   ] ++ lib.optional stdenv.hostPlatform.isLinux "--enable-linuxcaps";
21   buildInputs = [ openssl perl ]
22     ++ lib.optionals stdenv.hostPlatform.isLinux [ pps-tools libcap ];
24   hardeningEnable = [ "pie" ];
26   postInstall = ''
27     rm -rf $out/share/doc
28   '';
30   meta = with lib; {
31     homepage = "https://www.ntp.org/";
32     description = "Implementation of the Network Time Protocol";
33     license = {
34       # very close to isc and bsd2
35       url = "https://www.eecis.udel.edu/~mills/ntp/html/copyright.html";
36     };
37     maintainers = with maintainers; [ thoughtpolice ];
38     platforms = platforms.unix;
39   };