1 { lib, stdenvNoCC, fetchurl }:
6 pname = "ookla-speedtest";
10 x86_64-linux = fetchurl {
11 url = "https://install.speedtest.net/app/cli/${pname}-${version}-linux-x86_64.tgz";
12 sha256 = "sha256-VpBZbFT/m+1j+jcy+BigXbwtsZrTbtaPIcpfZNXP7rc=";
14 i686-linux = fetchurl {
15 url = "https://install.speedtest.net/app/cli/${pname}-${version}-linux-i386.tgz";
16 sha256 = "sha256-n/fhjbrn7g4DxmEIRFovts7qbIb2ZILhOS9ViBt3L+g=";
18 aarch64-linux = fetchurl {
19 url = "https://install.speedtest.net/app/cli/${pname}-${version}-linux-aarch64.tgz";
20 sha256 = "sha256-OVPSMdo3g+K/iQS23XJ2fFxuUz4WPTdC/QQ3r/pDG9M=";
22 armv7l-linux = fetchurl {
23 url = "https://install.speedtest.net/app/cli/${pname}-${version}-linux-armhf.tgz";
24 sha256 = "sha256-5F/N672KGFVTU1Uz3QMtaxC8jGTu5BObEUe5wJg10I0=";
26 x86_64-darwin = fetchurl {
27 url = "https://install.speedtest.net/app/cli/${pname}-${version}-macosx-universal.tgz";
28 sha256 = "sha256-yfgZIUnryI+GmZmM7Ksc4UQUQEWQfs5vU89Qh39N5m8=";
30 aarch64-darwin = x86_64-darwin;
34 stdenv.mkDerivation rec {
35 inherit pname version;
37 src = srcs.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
45 install -D speedtest $out/bin/speedtest
46 install -D speedtest.5 $out/share/man/man5/speedtest.5
50 description = "Command line internet speedtest tool by Ookla";
51 homepage = "https://www.speedtest.net/apps/cli";
52 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
53 license = licenses.unfree;
54 maintainers = with maintainers; [ kranzes ];
55 platforms = lib.attrNames srcs;
56 mainProgram = "speedtest";