forked from emily/nixfiles
37 lines
823 B
Nix
37 lines
823 B
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
rustPlatform,
|
|
}:
|
|
let
|
|
version = "1.3.2";
|
|
src = fetchFromGitHub {
|
|
owner = "librespeed";
|
|
repo = "speedtest-rust";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-z3lORjjJ89o+Du4mvKGydwxHU6Ra2jU5ue5Zsl/oIfY=";
|
|
};
|
|
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 ];
|
|
mainProgram = "librespeed-rs";
|
|
};
|
|
}
|