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