mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-18 19:03:28 +00:00
Merge pull request #292338 from arduano/arduano/gpustat
gpustat: init at 0.1.5
This commit is contained in:
commit
a397d87aa0
@ -1558,6 +1558,12 @@
|
|||||||
githubId = 160646;
|
githubId = 160646;
|
||||||
name = "Patrick Jackson";
|
name = "Patrick Jackson";
|
||||||
};
|
};
|
||||||
|
arduano = {
|
||||||
|
email = "leonid.shchurov@gmail.com";
|
||||||
|
github = "arduano";
|
||||||
|
githubId = 13347712;
|
||||||
|
name = "Leo Shchurov";
|
||||||
|
};
|
||||||
ardumont = {
|
ardumont = {
|
||||||
email = "eniotna.t@gmail.com";
|
email = "eniotna.t@gmail.com";
|
||||||
github = "ardumont";
|
github = "ardumont";
|
||||||
|
71
pkgs/by-name/gp/gpustat/package.nix
Normal file
71
pkgs/by-name/gp/gpustat/package.nix
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
{ lib
|
||||||
|
, fetchFromGitHub
|
||||||
|
, rustPlatform
|
||||||
|
, pkg-config
|
||||||
|
, fontconfig
|
||||||
|
, libGL
|
||||||
|
, libX11
|
||||||
|
, libXcursor
|
||||||
|
, libXi
|
||||||
|
, libXrandr
|
||||||
|
, cmake
|
||||||
|
, libxkbcommon
|
||||||
|
, wayland
|
||||||
|
, makeWrapper
|
||||||
|
}:
|
||||||
|
|
||||||
|
rustPlatform.buildRustPackage rec {
|
||||||
|
pname = "gpustat";
|
||||||
|
version = "0.1.5";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "arduano";
|
||||||
|
repo = "gpustat";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "sha256-M9P/qfw/tp9ogkNOE3b2fD2rGFnii1/VwmqJHqXb7Mg=";
|
||||||
|
};
|
||||||
|
|
||||||
|
cargoSha256 = "sha256-po/pEMZEtySZnz7l2FI7Wqbmp2CiWBijchKGkqlIMPU=";
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
cmake
|
||||||
|
makeWrapper
|
||||||
|
pkg-config
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
fontconfig
|
||||||
|
libGL
|
||||||
|
libX11
|
||||||
|
libXcursor
|
||||||
|
libXi
|
||||||
|
libXrandr
|
||||||
|
libxkbcommon
|
||||||
|
wayland
|
||||||
|
];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
mkdir -p $out/share/applications $out/share/pixmaps
|
||||||
|
|
||||||
|
cp assets/gpustat.desktop $out/share/applications
|
||||||
|
cp assets/gpustat_icon_* $out/share/pixmaps
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Wrap the program in a script that sets the LD_LIBRARY_PATH environment variable
|
||||||
|
# so that it can find the shared libraries it depends on. This is currently a
|
||||||
|
# requirement for running Rust programs that depend on `egui` within a Nix environment.
|
||||||
|
# https://github.com/emilk/egui/issues/2486
|
||||||
|
postFixup = ''
|
||||||
|
wrapProgram $out/bin/gpustat \
|
||||||
|
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath buildInputs}:/run/opengl-driver/lib"
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "A simple utility for viewing GPU utilization";
|
||||||
|
homepage = "https://github.com/arduano/gpustat";
|
||||||
|
license = licenses.asl20;
|
||||||
|
maintainers = with maintainers; [ arduano ];
|
||||||
|
mainProgram = "gpustat";
|
||||||
|
platforms = platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user