17 rustPlatform.buildRustPackage rec {
21 src = fetchFromGitHub {
25 hash = "sha256-M9P/qfw/tp9ogkNOE3b2fD2rGFnii1/VwmqJHqXb7Mg=";
28 cargoHash = "sha256-po/pEMZEtySZnz7l2FI7Wqbmp2CiWBijchKGkqlIMPU=";
48 mkdir -p $out/share/applications $out/share/pixmaps
50 cp assets/gpustat.desktop $out/share/applications
51 cp assets/gpustat_icon_* $out/share/pixmaps
54 # Wrap the program in a script that sets the LD_LIBRARY_PATH environment variable
55 # so that it can find the shared libraries it depends on. This is currently a
56 # requirement for running Rust programs that depend on `egui` within a Nix environment.
57 # https://github.com/emilk/egui/issues/2486
59 wrapProgram $out/bin/gpustat \
60 --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath buildInputs}:/run/opengl-driver/lib"
64 description = "Simple utility for viewing GPU utilization";
65 homepage = "https://github.com/arduano/gpustat";
66 license = licenses.asl20;
67 maintainers = with maintainers; [ arduano ];
68 mainProgram = "gpustat";
69 platforms = platforms.linux;