2024-02-07 01:22:34 +00:00
|
|
|
{ lib, stdenvNoCC, fetchurl }:
|
2021-07-16 19:40:57 +00:00
|
|
|
|
|
|
|
let
|
2024-02-07 01:22:34 +00:00
|
|
|
stdenv = stdenvNoCC;
|
|
|
|
|
2021-07-16 19:40:57 +00:00
|
|
|
pname = "ookla-speedtest";
|
2022-10-06 18:32:54 +00:00
|
|
|
version = "1.2.0";
|
2021-07-16 19:40:57 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
srcs = rec {
|
2021-07-16 19:40:57 +00:00
|
|
|
x86_64-linux = fetchurl {
|
2021-12-06 16:07:01 +00:00
|
|
|
url = "https://install.speedtest.net/app/cli/${pname}-${version}-linux-x86_64.tgz";
|
2022-10-06 18:32:54 +00:00
|
|
|
sha256 = "sha256-VpBZbFT/m+1j+jcy+BigXbwtsZrTbtaPIcpfZNXP7rc=";
|
2021-07-16 19:40:57 +00:00
|
|
|
};
|
2023-03-04 12:14:45 +00:00
|
|
|
i686-linux = fetchurl {
|
|
|
|
url = "https://install.speedtest.net/app/cli/${pname}-${version}-linux-i386.tgz";
|
|
|
|
sha256 = "sha256-n/fhjbrn7g4DxmEIRFovts7qbIb2ZILhOS9ViBt3L+g=";
|
|
|
|
};
|
2021-07-16 19:40:57 +00:00
|
|
|
aarch64-linux = fetchurl {
|
2021-12-06 16:07:01 +00:00
|
|
|
url = "https://install.speedtest.net/app/cli/${pname}-${version}-linux-aarch64.tgz";
|
2022-10-06 18:32:54 +00:00
|
|
|
sha256 = "sha256-OVPSMdo3g+K/iQS23XJ2fFxuUz4WPTdC/QQ3r/pDG9M=";
|
2021-07-16 19:40:57 +00:00
|
|
|
};
|
2023-03-04 12:14:45 +00:00
|
|
|
armv7l-linux = fetchurl {
|
|
|
|
url = "https://install.speedtest.net/app/cli/${pname}-${version}-linux-armhf.tgz";
|
|
|
|
sha256 = "sha256-5F/N672KGFVTU1Uz3QMtaxC8jGTu5BObEUe5wJg10I0=";
|
|
|
|
};
|
2022-06-16 17:23:12 +00:00
|
|
|
x86_64-darwin = fetchurl {
|
2022-10-06 18:32:54 +00:00
|
|
|
url = "https://install.speedtest.net/app/cli/${pname}-${version}-macosx-universal.tgz";
|
|
|
|
sha256 = "sha256-yfgZIUnryI+GmZmM7Ksc4UQUQEWQfs5vU89Qh39N5m8=";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
aarch64-darwin = x86_64-darwin;
|
2021-07-16 19:40:57 +00:00
|
|
|
};
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
inherit pname version;
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
src = srcs.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
2021-07-16 19:40:57 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
sourceRoot = ".";
|
2021-07-16 19:40:57 +00:00
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
dontConfigure = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -D speedtest $out/bin/speedtest
|
|
|
|
install -D speedtest.5 $out/share/man/man5/speedtest.5
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Command line internet speedtest tool by Ookla";
|
|
|
|
homepage = "https://www.speedtest.net/apps/cli";
|
2022-06-26 10:26:21 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2021-07-16 19:40:57 +00:00
|
|
|
license = licenses.unfree;
|
|
|
|
maintainers = with maintainers; [ kranzes ];
|
|
|
|
platforms = lib.attrNames srcs;
|
2024-02-07 01:22:34 +00:00
|
|
|
mainProgram = "speedtest";
|
2021-07-16 19:40:57 +00:00
|
|
|
};
|
|
|
|
}
|