Merge pull request #97469 from Emantor/bump/thermald

This commit is contained in:
Gabriel Ebner 2020-09-20 16:55:30 +02:00 committed by GitHub
commit 0c550170d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 54 additions and 13 deletions

View File

@ -23,6 +23,15 @@ in {
default = null; default = null;
description = "the thermald manual configuration file."; description = "the thermald manual configuration file.";
}; };
adaptive = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable adaptive mode, only working on kernel versions greater than 5.8.
Thermald will detect this itself, safe to enable on kernel versions below 5.8.
'';
};
}; };
}; };
@ -39,6 +48,7 @@ in {
--no-daemon \ --no-daemon \
${optionalString cfg.debug "--loglevel=debug"} \ ${optionalString cfg.debug "--loglevel=debug"} \
${optionalString (cfg.configFile != null) "--config-file ${cfg.configFile}"} \ ${optionalString (cfg.configFile != null) "--config-file ${cfg.configFile}"} \
${optionalString cfg.adaptive "--adaptive"} \
--dbus-enable --dbus-enable
''; '';
}; };

View File

@ -1,34 +1,64 @@
{ stdenv, fetchFromGitHub, autoconf, automake, libtool { autoconf
, pkgconfig, dbus, dbus-glib, libxml2, autoconf-archive }: , autoconf-archive
, automake
, dbus
, dbus-glib
, docbook_xml_dtd_412
, docbook-xsl-nons
, fetchFromGitHub
, gtk-doc
, libevdev
, libtool
, libxml2
, lzma
, pkgconfig
, stdenv
, upower
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "thermald"; pname = "thermald";
version = "2.2"; version = "2.3";
outputs = [ "out" "devdoc" ];
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "intel"; owner = "intel";
repo = "thermal_daemon"; repo = "thermal_daemon";
rev = "v${version}"; rev = "v${version}";
sha256 = "1nrhv3bypyc48h9smj5cpq63rawm6vqyg3cwkhpz69rgjnf1283m"; sha256 = "0cisaca2c2z1x9xvxc4lr6nl6yqx5bww6brh73m0p1n643jgq1dl";
}; };
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [
buildInputs = [ autoconf automake libtool dbus dbus-glib libxml2 autoconf-archive ]; autoconf
autoconf-archive
automake
docbook-xsl-nons
docbook_xml_dtd_412
gtk-doc
libtool
pkgconfig
];
patchPhase = ''sed -e 's/upstartconfdir = \/etc\/init/upstartconfdir = $(out)\/etc\/init/' -i data/Makefile.am''; buildInputs = [
dbus
preConfigure = '' dbus-glib
export PKG_CONFIG_PATH="${dbus.dev}/lib/pkgconfig:$PKG_CONFIG_PATH" libevdev
./autogen.sh libxml2
''; lzma
upower
];
configureFlags = [ configureFlags = [
"--sysconfdir=${placeholder "out"}/etc" "--sysconfdir=${placeholder "out"}/etc"
"--localstatedir=/var" "--localstatedir=/var"
"--enable-gtk-doc"
"--with-dbus-sys-dir=${placeholder "out"}/share/dbus-1/system.d" "--with-dbus-sys-dir=${placeholder "out"}/share/dbus-1/system.d"
"--with-systemdsystemunitdir=${placeholder "out"}/etc/systemd/system" "--with-systemdsystemunitdir=${placeholder "out"}/etc/systemd/system"
]; ];
preConfigure = "NO_CONFIGURE=1 ./autogen.sh";
postInstall = '' postInstall = ''
cp ./data/thermal-conf.xml $out/etc/thermald/ cp ./data/thermal-conf.xml $out/etc/thermald/
''; '';
@ -36,7 +66,8 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Thermal Daemon"; description = "Thermal Daemon";
homepage = "https://01.org/linux-thermal-daemon"; homepage = "https://01.org/linux-thermal-daemon";
license = licenses.gpl2; changelog = "https://github.com/intel/thermal_daemon/blob/master/README.txt";
license = licenses.gpl2Plus;
platforms = [ "x86_64-linux" "i686-linux" ]; platforms = [ "x86_64-linux" "i686-linux" ];
maintainers = with maintainers; [ abbradar ]; maintainers = with maintainers; [ abbradar ];
}; };