From 8d32fec9ccac96013dcd58d3bed08eb6fa98fe74 Mon Sep 17 00:00:00 2001 From: aleksana Date: Tue, 14 Mar 2023 05:40:02 +0800 Subject: [PATCH] speedtest-go: init at 1.5.2 --- .../tools/networking/speedtest-go/default.nix | 32 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 pkgs/tools/networking/speedtest-go/default.nix diff --git a/pkgs/tools/networking/speedtest-go/default.nix b/pkgs/tools/networking/speedtest-go/default.nix new file mode 100644 index 000000000000..c2ebe7077562 --- /dev/null +++ b/pkgs/tools/networking/speedtest-go/default.nix @@ -0,0 +1,32 @@ +{ lib +, buildGoModule +, fetchFromGitHub +}: + +buildGoModule rec { + pname = "speedtest-go"; + version = "1.5.2"; + + src = fetchFromGitHub { + owner = "showwin"; + repo = pname; + rev = "refs/tags/v${version}"; + hash = "sha256-9jLreb3tEw5bCVka6/BzGbsd5V3+9OHNzENe/IxL1YM="; + }; + + vendorHash = "sha256-A54G3fvs1bXSwPHVUNFC9VJqydqYR5t4I2fIBvrVoRE="; + + subPackages = [ "speedtest.go" ]; + + # test suite requires network + doCheck = false; + + meta = with lib; { + description = "CLI and Go API to Test Internet Speed using speedtest.net"; + homepage = "https://github.com/showwin/speedtest-go"; + changelog = "https://github.com/showwin/speedtest-go/releases/tag/v${version}"; + license = licenses.mit; + maintainers = with maintainers; [ aleksana ]; + mainProgram = "speedtest"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a8be984dab74..07c9f929672c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1593,6 +1593,8 @@ with pkgs; spectre-cli = callPackage ../tools/security/spectre-cli { }; + speedtest-go = callPackage ../tools/networking/speedtest-go { }; + speedtest-rs = callPackage ../tools/networking/speedtest-rs { }; steamtinkerlaunch = callPackage ../tools/games/steamtinkerlaunch { };