2023-03-04 12:14:45 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, openssl
|
|
|
|
, pkg-config
|
2023-03-24 00:07:29 +00:00
|
|
|
, stdenv
|
|
|
|
, darwin
|
2023-03-04 12:14:45 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "speedtest-rs";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "0.1.5";
|
2023-03-04 12:14:45 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nelsonjchen";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-JKthXrosqDZh6CWEqT08h3ySPZulitDol7lX3Eo7orM=";
|
2023-03-04 12:14:45 +00:00
|
|
|
};
|
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
buildInputs = [ openssl ] ++
|
2024-02-29 20:09:43 +00:00
|
|
|
lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.Security
|
|
|
|
darwin.apple_sdk.frameworks.SystemConfiguration
|
|
|
|
];
|
2023-03-04 12:14:45 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
cargoHash = "sha256-kUXHC/qXgukaUqaBykXB2ZWmfQEjzJuIyemr1ogVX1U=";
|
2023-03-04 12:14:45 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
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 licenses; [ mit asl20 ];
|
|
|
|
maintainers = with maintainers; [ GaetanLepage ];
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "speedtest-rs";
|
2023-03-04 12:14:45 +00:00
|
|
|
};
|
|
|
|
}
|