gnu: ntp: Find the location of installed binaries.

* gnu/packages/ntp.scm (ntp)[arguments]: Add a phase to set the full
path of the installed binaries.

Change-Id: I70d8a67c451ee01cce9afbc0bcd783b72dbc78be
This commit is contained in:
Efraim Flashner 2025-09-10 10:50:11 +03:00
parent 00266c58dc
commit e28bf7c6f6
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -204,6 +204,16 @@ time-stamping or reference clock, sub-microsecond accuracy is possible.")
"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"))))
(add-after 'unpack 'use-absolute-path-in-files
(lambda _
(substitute* "scripts/lib/NTP/Util.pm"
(("(ntpq_path = ')ntpq(';)" _ first last)
(string-append first #$output "/bin/ntpq" last))
(("(sntp_path = ')sntp(';)" _ first last)
(string-append first #$output "/bin/sntp" last)))
(substitute* "scripts/calc_tickadj/calc_tickadj.in"
(("`tickadj`")
(string-append "`" #$output "/bin/tickadj`")))))
(add-after 'install 'adjust-scripts
(lambda _
(substitute* (string-append #$output "/bin/calc_tickadj")