Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
80 lines
1.8 KiB
Nix
80 lines
1.8 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
ntpd-rs,
|
|
installShellFiles,
|
|
pandoc,
|
|
nixosTests,
|
|
nix-update-script,
|
|
testers,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "ntpd-rs";
|
|
version = "1.6.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "pendulum-project";
|
|
repo = "ntpd-rs";
|
|
tag = "v${version}";
|
|
hash = "sha256-X8nmfG7ZhtB4P6N0ku0Gc9xHOGJFeGTnB1WizZ2X1fk=";
|
|
};
|
|
|
|
cargoHash = "sha256-p3ryAggKR6ylCvaQ8M30OmLyGCL4bOYR/YwqNfAzcAg=";
|
|
|
|
nativeBuildInputs = [
|
|
pandoc
|
|
installShellFiles
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace utils/generate-man.sh \
|
|
--replace-fail 'utils/pandoc.sh' 'pandoc'
|
|
'';
|
|
|
|
postBuild = ''
|
|
source utils/generate-man.sh
|
|
'';
|
|
|
|
postInstall = ''
|
|
install -Dm444 -t $out/lib/systemd/system docs/examples/conf/{ntpd-rs,ntpd-rs-metrics}.service
|
|
installManPage docs/precompiled/man/{ntp.toml.5,ntp-ctl.8,ntp-daemon.8,ntp-metrics-exporter.8}
|
|
'';
|
|
|
|
outputs = [
|
|
"out"
|
|
"man"
|
|
];
|
|
|
|
passthru = {
|
|
tests = {
|
|
nixos = lib.optionalAttrs stdenv.hostPlatform.isLinux nixosTests.ntpd-rs;
|
|
version = testers.testVersion {
|
|
package = ntpd-rs;
|
|
inherit version;
|
|
};
|
|
};
|
|
|
|
updateScript = nix-update-script { };
|
|
};
|
|
|
|
meta = {
|
|
description = "Full-featured implementation of the Network Time Protocol";
|
|
homepage = "https://tweedegolf.nl/en/pendulum";
|
|
changelog = "https://github.com/pendulum-project/ntpd-rs/blob/v${version}/CHANGELOG.md";
|
|
license = with lib.licenses; [
|
|
mit # or
|
|
asl20
|
|
];
|
|
maintainers = with lib.maintainers; [
|
|
fpletz
|
|
getchoo
|
|
];
|
|
mainProgram = "ntp-ctl";
|
|
# note: Undefined symbols for architecture x86_64: "_ntp_adjtime"
|
|
broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64;
|
|
};
|
|
}
|