From 6c9a160f7005a70a04f1e7e16c1f83dcf5cf65bc Mon Sep 17 00:00:00 2001 From: seth Date: Mon, 20 May 2024 03:24:52 -0400 Subject: [PATCH 1/6] ntpd-rs: 1.1.0 -> 1.1.2 Diff: https://github.com/pendulum-project/ntpd-rs/compare/v1.1.0...v1.1.2 Changelog: https://github.com/pendulum-project/ntpd-rs/blob/v1.1.2/CHANGELOG.md --- pkgs/tools/networking/ntpd-rs/default.nix | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/pkgs/tools/networking/ntpd-rs/default.nix b/pkgs/tools/networking/ntpd-rs/default.nix index 200338578513..017550a917ec 100644 --- a/pkgs/tools/networking/ntpd-rs/default.nix +++ b/pkgs/tools/networking/ntpd-rs/default.nix @@ -9,20 +9,20 @@ rustPlatform.buildRustPackage rec { pname = "ntpd-rs"; - version = "1.1.0"; + version = "1.1.2"; src = fetchFromGitHub { owner = "pendulum-project"; repo = "ntpd-rs"; rev = "v${version}"; - hash = "sha256-IoTuI0M+stZNUVpaVsf7JR7uHcamSSVDMJxJ+7n5ayA="; + hash = "sha256-0ykJruuyD1Z/QcmrogodNlMZp05ocXIo3wdygB/AnT0="; }; - cargoHash = "sha256-iZuDNFy8c2UZUh3J11lEtfHlDFN+qPl4iZg+ps7AenE="; + cargoHash = "sha256-Badq3GYr7BoF8VNGGtKTT4/ksuds1zBcSxx5O3vLbzg="; - buildInputs = lib.optionals stdenv.isDarwin ([ + buildInputs = lib.optionals stdenv.isDarwin [ Security - ]); + ]; nativeBuildInputs = [ pandoc installShellFiles ]; postPatch = '' @@ -34,11 +34,9 @@ rustPlatform.buildRustPackage rec { source utils/generate-man.sh ''; - doCheck = true; - checkFlags = [ # doesn't find the testca - "--skip=keyexchange::tests::key_exchange_roundtrip" + "--skip=daemon::keyexchange::tests" # seems flaky? "--skip=algorithm::kalman::peer::tests::test_offset_steering_and_measurements" # needs networking From f059856d3456a06d0d7824fe01e004f2f2f6dc6f Mon Sep 17 00:00:00 2001 From: seth Date: Mon, 20 May 2024 03:32:23 -0400 Subject: [PATCH 2/6] ntpd-rs: inherit nixos test --- pkgs/tools/networking/ntpd-rs/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/tools/networking/ntpd-rs/default.nix b/pkgs/tools/networking/ntpd-rs/default.nix index 017550a917ec..9fb2a9b3f6a2 100644 --- a/pkgs/tools/networking/ntpd-rs/default.nix +++ b/pkgs/tools/networking/ntpd-rs/default.nix @@ -5,6 +5,7 @@ , installShellFiles , pandoc , Security +, nixosTests }: rustPlatform.buildRustPackage rec { @@ -50,6 +51,12 @@ rustPlatform.buildRustPackage rec { outputs = [ "out" "man" ]; + passthru = { + tests = { + nixos = lib.optionalAttrs stdenv.isLinux nixosTests.ntpd-rs; + }; + }; + meta = with lib; { description = "A full-featured implementation of the Network Time Protocol"; homepage = "https://tweedegolf.nl/en/pendulum"; From b24f690c5cbea9c21388c85b3cb2384875b21b0a Mon Sep 17 00:00:00 2001 From: seth Date: Mon, 20 May 2024 03:34:22 -0400 Subject: [PATCH 3/6] ntpd-rs: add mainProgram --- pkgs/tools/networking/ntpd-rs/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/tools/networking/ntpd-rs/default.nix b/pkgs/tools/networking/ntpd-rs/default.nix index 9fb2a9b3f6a2..51fe2744439e 100644 --- a/pkgs/tools/networking/ntpd-rs/default.nix +++ b/pkgs/tools/networking/ntpd-rs/default.nix @@ -61,6 +61,7 @@ rustPlatform.buildRustPackage rec { description = "A 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"; + mainProgram = "ntp-ctl"; license = with licenses; [ mit /* or */ asl20 ]; maintainers = with maintainers; [ fpletz ]; # note: Undefined symbols for architecture x86_64: "_ntp_adjtime" From e5faee92224cd93c7fc763a9d6393e9acf5c22ec Mon Sep 17 00:00:00 2001 From: seth Date: Mon, 20 May 2024 03:34:36 -0400 Subject: [PATCH 4/6] ntpd-rs: add version test --- pkgs/tools/networking/ntpd-rs/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/tools/networking/ntpd-rs/default.nix b/pkgs/tools/networking/ntpd-rs/default.nix index 51fe2744439e..37026d9c5cd5 100644 --- a/pkgs/tools/networking/ntpd-rs/default.nix +++ b/pkgs/tools/networking/ntpd-rs/default.nix @@ -2,10 +2,12 @@ , stdenv , rustPlatform , fetchFromGitHub +, ntpd-rs , installShellFiles , pandoc , Security , nixosTests +, testers }: rustPlatform.buildRustPackage rec { @@ -54,6 +56,10 @@ rustPlatform.buildRustPackage rec { passthru = { tests = { nixos = lib.optionalAttrs stdenv.isLinux nixosTests.ntpd-rs; + version = testers.testVersion { + package = ntpd-rs; + inherit version; + }; }; }; From dfb5e8dcabf81b54b378b04566c8e36b0440aa13 Mon Sep 17 00:00:00 2001 From: seth Date: Mon, 20 May 2024 03:35:01 -0400 Subject: [PATCH 5/6] ntpd-rs: add getchoo to maintainers --- pkgs/tools/networking/ntpd-rs/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/networking/ntpd-rs/default.nix b/pkgs/tools/networking/ntpd-rs/default.nix index 37026d9c5cd5..37b725508381 100644 --- a/pkgs/tools/networking/ntpd-rs/default.nix +++ b/pkgs/tools/networking/ntpd-rs/default.nix @@ -69,7 +69,7 @@ rustPlatform.buildRustPackage rec { changelog = "https://github.com/pendulum-project/ntpd-rs/blob/v${version}/CHANGELOG.md"; mainProgram = "ntp-ctl"; license = with licenses; [ mit /* or */ asl20 ]; - maintainers = with maintainers; [ fpletz ]; + maintainers = with maintainers; [ fpletz getchoo ]; # note: Undefined symbols for architecture x86_64: "_ntp_adjtime" broken = stdenv.isDarwin && stdenv.isx86_64; }; From 243d4e27ec337dacc5247554930cabe3b07e0d6a Mon Sep 17 00:00:00 2001 From: seth Date: Mon, 20 May 2024 03:38:49 -0400 Subject: [PATCH 6/6] ntpd-rs: format with nixfmt --- pkgs/tools/networking/ntpd-rs/default.nix | 45 ++++++++++++++--------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/pkgs/tools/networking/ntpd-rs/default.nix b/pkgs/tools/networking/ntpd-rs/default.nix index 37b725508381..70c1daf404ca 100644 --- a/pkgs/tools/networking/ntpd-rs/default.nix +++ b/pkgs/tools/networking/ntpd-rs/default.nix @@ -1,13 +1,14 @@ -{ lib -, stdenv -, rustPlatform -, fetchFromGitHub -, ntpd-rs -, installShellFiles -, pandoc -, Security -, nixosTests -, testers +{ + lib, + stdenv, + rustPlatform, + fetchFromGitHub, + ntpd-rs, + installShellFiles, + pandoc, + Security, + nixosTests, + testers, }: rustPlatform.buildRustPackage rec { @@ -23,14 +24,15 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-Badq3GYr7BoF8VNGGtKTT4/ksuds1zBcSxx5O3vLbzg="; - buildInputs = lib.optionals stdenv.isDarwin [ - Security + buildInputs = lib.optionals stdenv.isDarwin [ Security ]; + nativeBuildInputs = [ + pandoc + installShellFiles ]; - nativeBuildInputs = [ pandoc installShellFiles ]; postPatch = '' substituteInPlace utils/generate-man.sh \ - --replace 'utils/pandoc.sh' 'pandoc' + --replace-fail 'utils/pandoc.sh' 'pandoc' ''; postBuild = '' @@ -51,7 +53,10 @@ rustPlatform.buildRustPackage rec { installManPage docs/precompiled/man/{ntp.toml.5,ntp-ctl.8,ntp-daemon.8,ntp-metrics-exporter.8} ''; - outputs = [ "out" "man" ]; + outputs = [ + "out" + "man" + ]; passthru = { tests = { @@ -68,8 +73,14 @@ rustPlatform.buildRustPackage rec { homepage = "https://tweedegolf.nl/en/pendulum"; changelog = "https://github.com/pendulum-project/ntpd-rs/blob/v${version}/CHANGELOG.md"; mainProgram = "ntp-ctl"; - license = with licenses; [ mit /* or */ asl20 ]; - maintainers = with maintainers; [ fpletz getchoo ]; + license = with licenses; [ + mit # or + asl20 + ]; + maintainers = with maintainers; [ + fpletz + getchoo + ]; # note: Undefined symbols for architecture x86_64: "_ntp_adjtime" broken = stdenv.isDarwin && stdenv.isx86_64; };