xfce.xfce4-sensors-plugin: Enable xnvctrl by default

Have to be explicitly enabled since this tries to figure out the default
based on the existence of a hardcoded `/usr/include/NVCtrl` path, though
it looks like `NIX_CFLAGS_COMPILE` is properly (?) set so we don't need to
further patch it.

Format with nixfmt-rfc-style at the same time.
This commit is contained in:
useranon350 2024-06-02 17:33:39 -04:00 committed by Bobby Rong
parent e7139eb386
commit c5b09348a6
No known key found for this signature in database
2 changed files with 33 additions and 9 deletions

View File

@ -1,5 +1,6 @@
{ config
, lib
, linuxPackages
, pkgs
, generateSplicesForMkScope
, makeScopeWithSplicing'
@ -140,7 +141,9 @@ makeScopeWithSplicing' {
xfce4-mpc-plugin = callPackage ./panel-plugins/xfce4-mpc-plugin { };
xfce4-sensors-plugin = callPackage ./panel-plugins/xfce4-sensors-plugin { };
xfce4-sensors-plugin = callPackage ./panel-plugins/xfce4-sensors-plugin {
libXNVCtrl = linuxPackages.nvidia_x11.settings.libXNVCtrl;
};
xfce4-systemload-plugin = callPackage ./panel-plugins/xfce4-systemload-plugin { };

View File

@ -1,5 +1,20 @@
{ lib, stdenv, fetchurl, pkg-config, intltool, gtk3, libxfce4ui,
libxfce4util, xfce4-panel, libnotify, lm_sensors, hddtemp, netcat-gnu, gitUpdater
{
stdenv,
lib,
fetchurl,
pkg-config,
intltool,
gtk3,
libxfce4ui,
libxfce4util,
xfce4-panel,
libnotify,
lm_sensors,
hddtemp,
netcat-gnu,
nvidiaSupport ? true,
libXNVCtrl,
gitUpdater,
}:
let
@ -7,7 +22,7 @@ let
in
stdenv.mkDerivation rec {
pname = "xfce4-sensors-plugin";
pname = "xfce4-sensors-plugin";
version = "1.4.4";
src = fetchurl {
@ -29,14 +44,20 @@ stdenv.mkDerivation rec {
lm_sensors
hddtemp
netcat-gnu
];
] ++ lib.optionals nvidiaSupport [ libXNVCtrl ];
enableParallelBuilding = true;
configureFlags = [
"--with-pathhddtemp=${hddtemp}/bin/hddtemp"
"--with-pathnetcat=${netcat-gnu}/bin/netcat"
];
configureFlags =
[
"--with-pathhddtemp=${hddtemp}/bin/hddtemp"
"--with-pathnetcat=${netcat-gnu}/bin/netcat"
]
++ lib.optionals nvidiaSupport [
# Have to be explicitly enabled since this tries to figure out the default
# based on the existence of a hardcoded `/usr/include/NVCtrl` path.
"--enable-xnvctrl"
];
passthru.updateScript = gitUpdater {
url = "https://gitlab.xfce.org/panel-plugins/${pname}";