From 1943ec7d0820e8aeec99cee83ff711db100228f2 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 9 Sep 2025 09:59:05 +0300 Subject: [PATCH] gnu: ntp: Wrap update-leap command. * gnu/packages/ntp.scm (ntp)[inputs]: Add guile-3.0, perl-http-tiny, perl-io-socket-ssl, perl-net-ssleay. [arguments]: Add a phase to wrap the update-leap command. Change-Id: I66f9810fa3ac669290fb06a8ae50dabbd9872b7e --- gnu/packages/ntp.scm | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/gnu/packages/ntp.scm b/gnu/packages/ntp.scm index a256be9d588ba9b331eb3243f3fcb2ad5806349b..872d57a363cc6507acba827104620161913486ca 100644 --- a/gnu/packages/ntp.scm +++ b/gnu/packages/ntp.scm @@ -35,6 +35,7 @@ #:use-module (gnu packages base) #:use-module (gnu packages bison) #:use-module (gnu packages gps) + #:use-module (gnu packages guile) #:use-module (gnu packages libevent) #:use-module (gnu packages linux) #:use-module (gnu packages m4) @@ -47,6 +48,7 @@ #:use-module (gnu packages ruby-check) #:use-module (gnu packages time) #:use-module (gnu packages tls) + #:use-module (gnu packages web) #:use-module (guix build-system gnu) #:use-module (guix build-system waf) #:use-module (guix download) @@ -168,9 +170,13 @@ time-stamping or reference clock, sub-microsecond accuracy is possible.") (rename-file "sntp/libevent:build-aux" "sntp/libevent/build-aux"))))) (native-inputs (list which pkg-config)) - (inputs (cons* libevent + (inputs (cons* guile-3.0 ; for wrap-script + libevent openssl perl + perl-http-tiny + perl-io-socket-ssl + perl-net-ssleay ;; Build with POSIX capabilities support on GNU/Linux. This allows ;; 'ntpd' to run as non-root (when invoked with '-u'.) (if (target-linux?) @@ -197,7 +203,12 @@ time-stamping or reference clock, sub-microsecond accuracy is possible.") (substitute* '("scripts/update-leap/invoke-update-leap.texi" "scripts/update-leap/update-leap.in") (("https://www.ietf.org/timezones/data/leap-seconds.list") - "https://data.iana.org/time-zones/data/leap-seconds.list"))))))) + "https://data.iana.org/time-zones/data/leap-seconds.list")))) + (add-after 'install 'wrap-scripts + (lambda _ + (wrap-script (string-append #$output "/bin/update-leap") + `("PERL5LIB" ":" prefix + (,(getenv "PERL5LIB"))))))))) (build-system gnu-build-system) (synopsis "Real time clock synchronization system") (description "NTP is a system designed to synchronize the clocks of