1{
2 lib,
3 stdenv,
4 buildGoModule,
5 fetchFromGitHub,
6}:
7
8buildGoModule rec {
9 pname = "librespeed-cli";
10 version = "1.0.12";
11
12 src = fetchFromGitHub {
13 owner = "librespeed";
14 repo = "speedtest-cli";
15 tag = "v${version}";
16 hash = "sha256-njaQ/Be5rDCqkZJkij0nRi8aIO5uZYo8t3BjIcdKoCM=";
17 };
18
19 vendorHash = "sha256-dmaq9+0FjqYh2ZLg8bu8cPJZ9QClcvwid1nmsftmrf0=";
20
21 # Tests have additional requirements
22 doCheck = false;
23
24 postInstall = ''
25 mv $out/bin/speedtest-cli $out/bin/librespeed-cli
26 '';
27
28 meta = with lib; {
29 description = "Command line client for LibreSpeed";
30 homepage = "https://github.com/librespeed/speedtest-cli";
31 changelog = "https://github.com/librespeed/speedtest-cli/releases/tag/${src.tag}";
32 license = licenses.lgpl3Only;
33 maintainers = with maintainers; [ fab ];
34 mainProgram = "librespeed-cli";
35 broken = stdenv.hostPlatform.isDarwin;
36 };
37}