nixos: Add librespeed
All checks were successful
CI / Check, build and cache Nix flake (push) Successful in 22m56s
All checks were successful
CI / Check, build and cache Nix flake (push) Successful in 22m56s
This commit is contained in:
@@ -6,4 +6,5 @@ in
|
||||
# yeah turns out this is in nixpkgs now... we'll leave it as a sample i guess lol
|
||||
monocraft' = callPackage ./monocraft.nix { };
|
||||
vfio-pci-bind = callPackage ./vfio-pci-bind.nix { };
|
||||
librespeed-go = callPackage ./librespeed-go.nix { };
|
||||
}
|
||||
|
26
pkgs/librespeed-go.nix
Normal file
26
pkgs/librespeed-go.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{ lib, fetchFromGitHub, buildGoModule, ... }:
|
||||
let
|
||||
webSrc = fetchFromGitHub {
|
||||
owner = "librespeed";
|
||||
repo = "speedtest";
|
||||
rev = "5.3.0";
|
||||
hash = "sha256-OgKGLQcfWX/sBLzaHI6TcJHxX1Wol6K7obLf0+CHrC8=";
|
||||
};
|
||||
in
|
||||
buildGoModule rec {
|
||||
pname = "librespeed-go";
|
||||
version = "1.1.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "librespeed";
|
||||
repo = "speedtest-go";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-ywGrodl/mj/WB25F0TKVvaV0PV4lgc+KEj0x/ix9HT8=";
|
||||
};
|
||||
vendorHash = "sha256-ev5TEv8u+tx7xIvNaK8b5iq2XXF6I37Fnrr8mb+N2WM=";
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p "$out"/assets
|
||||
cp "${webSrc}"/{speedtest.js,speedtest_worker.js,favicon.ico} "$out"/assets/
|
||||
'';
|
||||
}
|
Reference in New Issue
Block a user