2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, libressl
|
2020-04-24 23:36:52 +00:00
|
|
|
, privsepPath ? "/var/empty"
|
|
|
|
, privsepUser ? "ntp"
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "openntpd";
|
2020-12-25 13:55:36 +00:00
|
|
|
version = "6.8p1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://openbsd/OpenNTPD/${pname}-${version}.tar.gz";
|
2020-12-25 13:55:36 +00:00
|
|
|
sha256 = "0ijsylc7a4jlpxsqa0jq1w1c7333id8pcakzl7a5749ria1xp0l5";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
postPatch = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
sed -i '20i#include <sys/cdefs.h>' src/ntpd.h
|
|
|
|
sed -i '19i#include <sys/cdefs.h>' src/log.c
|
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--with-privsep-path=${privsepPath}"
|
|
|
|
"--with-privsep-user=${privsepUser}"
|
|
|
|
"--sysconfdir=/etc"
|
|
|
|
"--localstatedir=/var"
|
|
|
|
"--with-cacert=/etc/ssl/certs/ca-certificates.crt"
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ libressl ];
|
|
|
|
|
|
|
|
installFlags = [
|
|
|
|
"sysconfdir=\${out}/etc"
|
|
|
|
"localstatedir=\${TMPDIR}"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-04-15 01:41:22 +00:00
|
|
|
homepage = "https://www.openntpd.org/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
description = "OpenBSD NTP daemon (Debian port)";
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ thoughtpolice ];
|
|
|
|
};
|
|
|
|
}
|