nixpkgs/pkgs/tools/networking/speedtest-rs/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

54 lines
1.4 KiB
Nix
Raw Normal View History

2023-02-26 14:50:14 +03:00
{ lib
, rustPlatform
, fetchFromGitHub
, openssl
, pkg-config
, stdenv
, darwin
, nix-update-script
, testers
, speedtest-rs
2023-02-26 14:50:14 +03:00
}:
rustPlatform.buildRustPackage rec {
pname = "speedtest-rs";
version = "0.2.0";
2023-02-26 14:50:14 +03:00
src = fetchFromGitHub {
owner = "nelsonjchen";
repo = "speedtest-rs";
2023-02-26 14:50:14 +03:00
rev = "refs/tags/v${version}";
hash = "sha256-1FAFYiWDD/KG/7/UTv/EW6Nj2GnU0GZFFq6ouMc0URA=";
2023-02-26 14:50:14 +03:00
};
buildInputs = [ openssl ] ++
2024-02-14 18:17:34 +03:00
lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
darwin.apple_sdk.frameworks.SystemConfiguration
];
2023-02-26 14:50:14 +03:00
nativeBuildInputs = [ pkg-config ];
cargoHash = "sha256-0YPCBzidE1+LgIYk457eSoerLvQuuZs9cTd7uUt1Lr8=";
2023-02-26 14:50:14 +03:00
# Fail for unclear reasons (only on darwin)
checkFlags = lib.optionals stdenv.isDarwin [
"--skip=speedtest::tests::test_get_configuration"
"--skip=speedtest::tests::test_get_server_list_with_config"
];
passthru = {
updateScript = nix-update-script { };
tests.version = testers.testVersion { package = speedtest-rs; };
};
meta = {
2023-02-26 14:50:14 +03:00
description = "Command line internet speedtest tool written in rust";
homepage = "https://github.com/nelsonjchen/speedtest-rs";
changelog = "https://github.com/nelsonjchen/speedtest-rs/blob/v${version}/CHANGELOG.md";
license = with lib.licenses; [ mit asl20 ];
maintainers = with lib.maintainers; [ GaetanLepage ];
2024-02-11 05:19:15 +03:00
mainProgram = "speedtest-rs";
2023-02-26 14:50:14 +03:00
};
}