Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crusader: init at 0.3.2 #374879

Merged
merged 1 commit into from
Jan 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 90 additions & 0 deletions pkgs/by-name/cr/crusader/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,

# nativeBuildInputs
makeWrapper,
pkg-config,
autoPatchelfHook,

# buildInputs
fontconfig,
libgcc,
libxkbcommon,
xorg,

libGL,
wayland,
versionCheckHook,
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 =
[
makeWrapper
pkg-config
]
++ lib.optionals stdenv.isLinux [
autoPatchelfHook
];

buildInputs =
[
fontconfig
libgcc
libxkbcommon
]
++ lib.optionals stdenv.isLinux [
xorg.libX11
xorg.libXcursor
xorg.libXi
];

# required for crusader-gui
runtimeDependencies = [
libGL
libxkbcommon
];

x123 marked this conversation as resolved.
Show resolved Hide resolved
GaetanLepage marked this conversation as resolved.
Show resolved Hide resolved
postFixup = ''
# the program looks for libwayland-client.so at runtime
wrapProgram $out/bin/crusader-gui \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ wayland ]}
'';

nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = [ "--version" ];
doInstallCheck = true;

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;
mainProgram = "crusader";
};
}