From d5d1843524b48437a4af48550078884318a746aa Mon Sep 17 00:00:00 2001 From: x123 Date: Sat, 18 Jan 2025 19:58:33 +0100 Subject: [PATCH] crusader: init at 0.3.2 --- pkgs/by-name/cr/crusader/package.nix | 64 ++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 pkgs/by-name/cr/crusader/package.nix diff --git a/pkgs/by-name/cr/crusader/package.nix b/pkgs/by-name/cr/crusader/package.nix new file mode 100644 index 0000000000000..cbc077bf9b9fa --- /dev/null +++ b/pkgs/by-name/cr/crusader/package.nix @@ -0,0 +1,64 @@ +{ + lib, + stdenv, + rustPlatform, + fetchFromGitHub, + pkg-config, + autoPatchelfHook, + fontconfig, + libgcc, + libxkbcommon, + xorg, + libGL, + nix-update-script, +}: +rustPlatform.buildRustPackage rec { + pname = "crusader"; + version = "0.3.2"; + + src = fetchFromGitHub { + owner = "Zoxc"; + repo = "crusader"; + tag = "v${version}"; + hash = "sha256-M5zMOOYDS91p0EuDSlQ3K6eiVQpbX6953q+cXBMix2s="; + }; + + sourceRoot = "${src.name}/src"; + + useFetchCargoVendor = true; + cargoHash = "sha256-f0TWiRX203/gNsa9UEr/1Bv+kUxLAK/Zlw+S693xZlE="; + + # autoPatchelfHook required on linux for crusader-gui + nativeBuildInputs = [ + pkg-config + ] ++ lib.optionals (!stdenv.isDarwin) [ autoPatchelfHook ]; + + buildInputs = + [ + fontconfig + libgcc + libxkbcommon + ] + ++ lib.optionals (!stdenv.isDarwin) [ + xorg.libX11 + xorg.libXcursor + xorg.libXi + ]; + + # required for crusader-gui + runtimeDependencies = [ + libGL + libxkbcommon + ]; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Network throughput and latency tester"; + homepage = "https://github.com/Zoxc/crusader"; + changelog = "https://github.com/Zoxc/crusader/blob/v${version}/CHANGELOG.md"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ x123 ]; + platforms = lib.platforms.all; + }; +}