Merge pull request #313068 from getchoo/pkgs/ntpd-rs/1.1.2

ntpd-rs: 1.1.0 -> 1.1.2; passthru tests; adopt

authored by Weijia Wang and committed by GitHub 7189f1c8 671eb6be

+44 -21
+44 -21
pkgs/tools/networking/ntpd-rs/default.nix
··· 1 - { lib 2 - , stdenv 3 - , rustPlatform 4 - , fetchFromGitHub 5 - , installShellFiles 6 - , pandoc 7 - , Security 1 + { 2 + lib, 3 + stdenv, 4 + rustPlatform, 5 + fetchFromGitHub, 6 + ntpd-rs, 7 + installShellFiles, 8 + pandoc, 9 + Security, 10 + nixosTests, 11 + testers, 8 12 }: 9 13 10 14 rustPlatform.buildRustPackage rec { 11 15 pname = "ntpd-rs"; 12 - version = "1.1.0"; 16 + version = "1.1.2"; 13 17 14 18 src = fetchFromGitHub { 15 19 owner = "pendulum-project"; 16 20 repo = "ntpd-rs"; 17 21 rev = "v${version}"; 18 - hash = "sha256-IoTuI0M+stZNUVpaVsf7JR7uHcamSSVDMJxJ+7n5ayA="; 22 + hash = "sha256-0ykJruuyD1Z/QcmrogodNlMZp05ocXIo3wdygB/AnT0="; 19 23 }; 20 24 21 - cargoHash = "sha256-iZuDNFy8c2UZUh3J11lEtfHlDFN+qPl4iZg+ps7AenE="; 25 + cargoHash = "sha256-Badq3GYr7BoF8VNGGtKTT4/ksuds1zBcSxx5O3vLbzg="; 22 26 23 - buildInputs = lib.optionals stdenv.isDarwin ([ 24 - Security 25 - ]); 26 - nativeBuildInputs = [ pandoc installShellFiles ]; 27 + buildInputs = lib.optionals stdenv.isDarwin [ Security ]; 28 + nativeBuildInputs = [ 29 + pandoc 30 + installShellFiles 31 + ]; 27 32 28 33 postPatch = '' 29 34 substituteInPlace utils/generate-man.sh \ 30 - --replace 'utils/pandoc.sh' 'pandoc' 35 + --replace-fail 'utils/pandoc.sh' 'pandoc' 31 36 ''; 32 37 33 38 postBuild = '' 34 39 source utils/generate-man.sh 35 40 ''; 36 - 37 - doCheck = true; 38 41 39 42 checkFlags = [ 40 43 # doesn't find the testca 41 - "--skip=keyexchange::tests::key_exchange_roundtrip" 44 + "--skip=daemon::keyexchange::tests" 42 45 # seems flaky? 43 46 "--skip=algorithm::kalman::peer::tests::test_offset_steering_and_measurements" 44 47 # needs networking ··· 50 53 installManPage docs/precompiled/man/{ntp.toml.5,ntp-ctl.8,ntp-daemon.8,ntp-metrics-exporter.8} 51 54 ''; 52 55 53 - outputs = [ "out" "man" ]; 56 + outputs = [ 57 + "out" 58 + "man" 59 + ]; 60 + 61 + passthru = { 62 + tests = { 63 + nixos = lib.optionalAttrs stdenv.isLinux nixosTests.ntpd-rs; 64 + version = testers.testVersion { 65 + package = ntpd-rs; 66 + inherit version; 67 + }; 68 + }; 69 + }; 54 70 55 71 meta = with lib; { 56 72 description = "A full-featured implementation of the Network Time Protocol"; 57 73 homepage = "https://tweedegolf.nl/en/pendulum"; 58 74 changelog = "https://github.com/pendulum-project/ntpd-rs/blob/v${version}/CHANGELOG.md"; 59 - license = with licenses; [ mit /* or */ asl20 ]; 60 - maintainers = with maintainers; [ fpletz ]; 75 + mainProgram = "ntp-ctl"; 76 + license = with licenses; [ 77 + mit # or 78 + asl20 79 + ]; 80 + maintainers = with maintainers; [ 81 + fpletz 82 + getchoo 83 + ]; 61 84 # note: Undefined symbols for architecture x86_64: "_ntp_adjtime" 62 85 broken = stdenv.isDarwin && stdenv.isx86_64; 63 86 };