chrony: update build configuration
This commit is contained in:
parent
409c646eeb
commit
53cbb123f5
|
@ -1,5 +1,7 @@
|
||||||
{ lib, stdenv, fetchurl, pkg-config, libcap, readline, texinfo, nss, nspr
|
{ lib, stdenv, fetchurl, pkg-config
|
||||||
, libseccomp, pps-tools, gnutls }:
|
, gnutls, libedit, nspr, nss, readline, texinfo
|
||||||
|
, libcap, libseccomp, pps-tools
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "chrony";
|
pname = "chrony";
|
||||||
|
@ -7,22 +9,33 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.tuxfamily.org/chrony/${pname}-${version}.tar.gz";
|
url = "https://download.tuxfamily.org/chrony/${pname}-${version}.tar.gz";
|
||||||
sha256 = "sha256-nQ2oiahl8ImlohYQ/7ZxPjyUOM4wOmO0nC+26v9biAQ=";
|
hash = "sha256-nQ2oiahl8ImlohYQ/7ZxPjyUOM4wOmO0nC+26v9biAQ=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
outputs = [ "out" "man" ];
|
||||||
|
|
||||||
|
nativeBuildInputs = [ pkg-config ];
|
||||||
|
|
||||||
|
buildInputs = [ gnutls libedit nspr nss readline texinfo ]
|
||||||
|
++ lib.optionals stdenv.isLinux [ libcap libseccomp pps-tools ];
|
||||||
|
|
||||||
|
configureFlags = [
|
||||||
|
"--enable-ntp-signd"
|
||||||
|
"--sbindir=$(out)/bin"
|
||||||
|
"--chronyrundir=/run/chrony"
|
||||||
|
] ++ lib.optional stdenv.isLinux "--enable-scfilter";
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# Cleanup the installation script
|
||||||
|
./makefile.patch
|
||||||
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
patchShebangs test
|
patchShebangs test
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildInputs = [ readline texinfo nss nspr gnutls ]
|
|
||||||
++ lib.optionals stdenv.isLinux [ libcap libseccomp pps-tools ];
|
|
||||||
nativeBuildInputs = [ pkg-config ];
|
|
||||||
|
|
||||||
hardeningEnable = [ "pie" ];
|
hardeningEnable = [ "pie" ];
|
||||||
|
|
||||||
configureFlags = [ "--chronyvardir=$(out)/var/lib/chrony" "--enable-ntp-signd" ]
|
|
||||||
++ lib.optional stdenv.isLinux "--enable-scfilter";
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Sets your computer's clock from time servers on the Net";
|
description = "Sets your computer's clock from time servers on the Net";
|
||||||
homepage = "https://chrony.tuxfamily.org/";
|
homepage = "https://chrony.tuxfamily.org/";
|
||||||
|
|
23
pkgs/tools/networking/chrony/makefile.patch
Normal file
23
pkgs/tools/networking/chrony/makefile.patch
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
diff --git a/Makefile.in b/Makefile.in
|
||||||
|
index ef100a4..47f54f4 100644
|
||||||
|
--- a/Makefile.in
|
||||||
|
+++ b/Makefile.in
|
||||||
|
@@ -23,7 +23,7 @@
|
||||||
|
|
||||||
|
SYSCONFDIR = @SYSCONFDIR@
|
||||||
|
BINDIR = @BINDIR@
|
||||||
|
-SBINDIR = @SBINDIR@
|
||||||
|
+SBINDIR = @BINDIR@
|
||||||
|
LOCALSTATEDIR = @LOCALSTATEDIR@
|
||||||
|
CHRONYVARDIR = @CHRONYVARDIR@
|
||||||
|
DESTDIR =
|
||||||
|
@@ -86,9 +86,7 @@ getdate :
|
||||||
|
|
||||||
|
install: chronyd chronyc
|
||||||
|
[ -d $(DESTDIR)$(SYSCONFDIR) ] || mkdir -p $(DESTDIR)$(SYSCONFDIR)
|
||||||
|
- [ -d $(DESTDIR)$(SBINDIR) ] || mkdir -p $(DESTDIR)$(SBINDIR)
|
||||||
|
[ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR)
|
||||||
|
- [ -d $(DESTDIR)$(CHRONYVARDIR) ] || mkdir -p $(DESTDIR)$(CHRONYVARDIR)
|
||||||
|
if [ -f $(DESTDIR)$(SBINDIR)/chronyd ]; then rm -f $(DESTDIR)$(SBINDIR)/chronyd ; fi
|
||||||
|
if [ -f $(DESTDIR)$(BINDIR)/chronyc ]; then rm -f $(DESTDIR)$(BINDIR)/chronyc ; fi
|
||||||
|
cp chronyd $(DESTDIR)$(SBINDIR)/chronyd
|
Loading…
Reference in a new issue