File tree Expand file tree Collapse file tree 1 file changed +90
-0
lines changed
Expand file tree Collapse file tree 1 file changed +90
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ lib ,
3+ stdenv ,
4+ rustPlatform ,
5+ fetchFromGitHub ,
6+
7+ # nativeBuildInputs
8+ makeWrapper ,
9+ pkg-config ,
10+ autoPatchelfHook ,
11+
12+ # buildInputs
13+ fontconfig ,
14+ libgcc ,
15+ libxkbcommon ,
16+ xorg ,
17+
18+ libGL ,
19+ wayland ,
20+ versionCheckHook ,
21+ nix-update-script ,
22+ } :
23+ rustPlatform . buildRustPackage rec {
24+ pname = "crusader" ;
25+ version = "0.3.2" ;
26+
27+ src = fetchFromGitHub {
28+ owner = "Zoxc" ;
29+ repo = "crusader" ;
30+ tag = "v${ version } " ;
31+ hash = "sha256-M5zMOOYDS91p0EuDSlQ3K6eiVQpbX6953q+cXBMix2s=" ;
32+ } ;
33+
34+ sourceRoot = "${ src . name } /src" ;
35+
36+ useFetchCargoVendor = true ;
37+ cargoHash = "sha256-f0TWiRX203/gNsa9UEr/1Bv+kUxLAK/Zlw+S693xZlE=" ;
38+
39+ # autoPatchelfHook required on linux for crusader-gui
40+ nativeBuildInputs =
41+ [
42+ makeWrapper
43+ pkg-config
44+ ]
45+ ++ lib . optionals stdenv . isLinux [
46+ autoPatchelfHook
47+ ] ;
48+
49+ buildInputs =
50+ [
51+ fontconfig
52+ libgcc
53+ libxkbcommon
54+ ]
55+ ++ lib . optionals stdenv . isLinux [
56+ xorg . libX11
57+ xorg . libXcursor
58+ xorg . libXi
59+ ] ;
60+
61+ # required for crusader-gui
62+ runtimeDependencies = [
63+ libGL
64+ libxkbcommon
65+ ] ;
66+
67+ postFixup = ''
68+ # the program looks for libwayland-client.so at runtime
69+ wrapProgram $out/bin/crusader-gui \
70+ --prefix LD_LIBRARY_PATH : ${ lib . makeLibraryPath [ wayland ] }
71+ '' ;
72+
73+ nativeInstallCheckInputs = [
74+ versionCheckHook
75+ ] ;
76+ versionCheckProgramArg = [ "--version" ] ;
77+ doInstallCheck = true ;
78+
79+ passthru . updateScript = nix-update-script { } ;
80+
81+ meta = {
82+ description = "Network throughput and latency tester" ;
83+ homepage = "https://github.com/Zoxc/crusader" ;
84+ changelog = "https://github.com/Zoxc/crusader/blob/v${ version } /CHANGELOG.md" ;
85+ license = lib . licenses . mit ;
86+ maintainers = with lib . maintainers ; [ x123 ] ;
87+ platforms = lib . platforms . all ;
88+ mainProgram = "crusader" ;
89+ } ;
90+ }
You can’t perform that action at this time.
0 commit comments