mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-12 03:56:17 +03:00
psensor: init at 1.2.0
psensor is a graphical hardware monitoring application for Linux
This commit is contained in:
parent
631ec734eb
commit
3b1c4fce4f
@ -1,18 +1,43 @@
|
||||
nvidia_x11: sha256:
|
||||
|
||||
{ stdenv, lib, fetchurl, pkgconfig, m4, jansson, gtk2, dbus, gtk3, libXv, libXrandr, libvdpau
|
||||
{ stdenv, lib, fetchurl, pkgconfig, m4, jansson, gtk2, dbus, gtk3, libXv, libXrandr, libvdpau, libXext
|
||||
, librsvg, wrapGAppsHook
|
||||
, withGtk2 ? false, withGtk3 ? true
|
||||
}:
|
||||
|
||||
let
|
||||
src = fetchurl {
|
||||
url = "https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${nvidia_x11.version}.tar.bz2";
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
libXNVCtrl = stdenv.mkDerivation {
|
||||
name = "libXNVCtrl-${nvidia_x11.version}";
|
||||
inherit (nvidia_x11) version;
|
||||
inherit src;
|
||||
|
||||
buildInputs = [ libXrandr libXext ];
|
||||
|
||||
preBuild = ''
|
||||
cd src/libXNVCtrl
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib
|
||||
mkdir -p $out/include/NVCtrl
|
||||
|
||||
cp libXNVCtrl.a $out/lib
|
||||
cp NVCtrl.h $out/include/NVCtrl
|
||||
cp NVCtrlLib.h $out/include/NVCtrl
|
||||
'';
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "nvidia-settings-${nvidia_x11.version}";
|
||||
inherit (nvidia_x11) version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://download.nvidia.com/XFree86/nvidia-settings/${name}.tar.bz2";
|
||||
inherit sha256;
|
||||
};
|
||||
inherit src;
|
||||
|
||||
nativeBuildInputs = [ pkgconfig m4 ];
|
||||
|
||||
@ -52,6 +77,10 @@ stdenv.mkDerivation rec {
|
||||
$out/bin/$binaryName
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
inherit libXNVCtrl;
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "http://www.nvidia.com/object/unix.html";
|
||||
description = "Settings application for NVIDIA graphics cards";
|
||||
|
33
pkgs/tools/system/psensor/default.nix
Normal file
33
pkgs/tools/system/psensor/default.nix
Normal file
@ -0,0 +1,33 @@
|
||||
{ stdenv, lib, fetchurl, pkgconfig, lm_sensors, libgtop, libatasmart, gtk3
|
||||
, libnotify, udisks2, libXNVCtrl, wrapGAppsHook
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "psensor-${version}";
|
||||
|
||||
version = "1.2.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://wpitchoune.net/psensor/files/psensor-${version}.tar.gz";
|
||||
sha256 = "1smbidbby4rh14jnh9kn7y64qf486aqnmyxcgacjvkz27cqqnw4r";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig wrapGAppsHook ];
|
||||
|
||||
buildInputs = [
|
||||
lm_sensors libgtop libatasmart gtk3 libnotify udisks2
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${libXNVCtrl}/include"
|
||||
NIX_LDFLAGS="$NIX_LDFLAGS -L${libXNVCtrl}/lib"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Graphical hardware monitoring application for Linux";
|
||||
homepage = "https://wpitchoune.net/psensor/";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ cstrahan ];
|
||||
};
|
||||
}
|
@ -3768,6 +3768,10 @@ with pkgs;
|
||||
|
||||
psutils = callPackage ../tools/typesetting/psutils { };
|
||||
|
||||
psensor = callPackage ../tools/system/psensor {
|
||||
libXNVCtrl = linuxPackages.nvidia_x11.settings.libXNVCtrl;
|
||||
};
|
||||
|
||||
pv = callPackage ../tools/misc/pv { };
|
||||
|
||||
pwgen = callPackage ../tools/security/pwgen { };
|
||||
|
Loading…
Reference in New Issue
Block a user