2024-09-24 23:56:26 +02:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
rustPlatform,
|
|
|
|
}:
|
|
|
|
let
|
2024-09-29 17:47:40 +02:00
|
|
|
# https://github.com/librespeed/speedtest-rust/pull/7
|
|
|
|
version = "unstable-2024-09-28";
|
2024-09-24 23:56:26 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "librespeed";
|
|
|
|
repo = "speedtest-rust";
|
2024-09-29 17:47:40 +02:00
|
|
|
rev = "a74f25d07da3eb665ce806e015c537264f7254c9";
|
|
|
|
hash = "sha256-+G1DFHQONXXg/5apSBlBkRvuLT4qCJaeFnQSLWt0CD0=";
|
2024-09-24 23:56:26 +02:00
|
|
|
};
|
|
|
|
in
|
|
|
|
rustPlatform.buildRustPackage {
|
|
|
|
pname = "librespeed-rust";
|
|
|
|
inherit version src;
|
|
|
|
|
|
|
|
cargoLock.lockFile = "${src}/Cargo.lock";
|
|
|
|
|
|
|
|
# error: linker `aarch64-linux-gnu-gcc` not found
|
|
|
|
postPatch = ''
|
|
|
|
rm .cargo/config.toml
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
cp -r assets $out/
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A very lightweight speed test implementation in Rust.";
|
|
|
|
homepage = "https://github.com/librespeed/speedtest-rust";
|
|
|
|
license = lib.licenses.lgpl3Plus;
|
|
|
|
maintainers = with lib.maintainers; [ snaki ];
|
2024-09-27 00:06:27 +02:00
|
|
|
mainProgram = "librespeed-rs";
|
2024-09-24 23:56:26 +02:00
|
|
|
};
|
|
|
|
}
|