traefik: add djds as maintainer (#377217)
[NixPkgs.git] / pkgs / by-name / op / openntpd / package.nix
bloba92a32c151bbae5e3101aa6f725892218642e8f6
2   lib,
3   stdenv,
4   fetchurl,
5   libressl,
6   privsepPath ? "/var/empty",
7   privsepUser ? "ntp",
8 }:
10 stdenv.mkDerivation rec {
11   pname = "openntpd";
12   version = "6.8p1";
14   src = fetchurl {
15     url = "mirror://openbsd/OpenNTPD/${pname}-${version}.tar.gz";
16     sha256 = "0ijsylc7a4jlpxsqa0jq1w1c7333id8pcakzl7a5749ria1xp0l5";
17   };
19   postPatch = ''
20     sed -i '20i#include <sys/cdefs.h>' src/ntpd.h
21     sed -i '19i#include <sys/cdefs.h>' src/log.c
22   '';
24   configureFlags = [
25     "--with-privsep-path=${privsepPath}"
26     "--with-privsep-user=${privsepUser}"
27     "--sysconfdir=/etc"
28     "--localstatedir=/var"
29     "--with-cacert=/etc/ssl/certs/ca-certificates.crt"
30   ];
32   buildInputs = [ libressl ];
34   installFlags = [
35     "sysconfdir=\${out}/etc"
36     "localstatedir=\${TMPDIR}"
37   ];
39   meta = with lib; {
40     homepage = "https://www.openntpd.org/";
41     license = licenses.bsd3;
42     description = "OpenBSD NTP daemon (Debian port)";
43     platforms = platforms.all;
44     maintainers = with maintainers; [ thoughtpolice ];
45   };