2018-07-17 13:11:16 -07:00
|
|
|
{ stdenv, fetchFromGitHub, autoconf, automake, libtool
|
2020-04-25 07:28:21 -07:00
|
|
|
, pkgconfig, dbus, dbus-glib, libxml2, autoconf-archive }:
|
2014-08-13 17:17:55 -07:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "thermald";
|
2020-07-07 08:37:47 -07:00
|
|
|
version = "2.2";
|
2016-04-29 17:05:14 -07:00
|
|
|
|
2015-06-11 17:30:47 -07:00
|
|
|
src = fetchFromGitHub {
|
2020-04-25 07:28:21 -07:00
|
|
|
owner = "intel";
|
2015-06-11 17:30:47 -07:00
|
|
|
repo = "thermal_daemon";
|
|
|
|
rev = "v${version}";
|
2020-07-07 08:37:47 -07:00
|
|
|
sha256 = "1nrhv3bypyc48h9smj5cpq63rawm6vqyg3cwkhpz69rgjnf1283m";
|
2014-08-13 17:17:55 -07:00
|
|
|
};
|
2015-06-11 17:30:47 -07:00
|
|
|
|
2017-09-05 14:26:13 -07:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2020-04-25 07:28:21 -07:00
|
|
|
buildInputs = [ autoconf automake libtool dbus dbus-glib libxml2 autoconf-archive ];
|
2014-08-13 17:17:55 -07:00
|
|
|
|
|
|
|
patchPhase = ''sed -e 's/upstartconfdir = \/etc\/init/upstartconfdir = $(out)\/etc\/init/' -i data/Makefile.am'';
|
|
|
|
|
|
|
|
preConfigure = ''
|
2018-07-17 13:11:16 -07:00
|
|
|
export PKG_CONFIG_PATH="${dbus.dev}/lib/pkgconfig:$PKG_CONFIG_PATH"
|
2017-01-29 09:07:47 -08:00
|
|
|
./autogen.sh
|
|
|
|
'';
|
2014-08-13 17:17:55 -07:00
|
|
|
|
|
|
|
configureFlags = [
|
2019-09-15 19:41:02 -07:00
|
|
|
"--sysconfdir=${placeholder "out"}/etc"
|
|
|
|
"--localstatedir=/var"
|
|
|
|
"--with-dbus-sys-dir=${placeholder "out"}/share/dbus-1/system.d"
|
|
|
|
"--with-systemdsystemunitdir=${placeholder "out"}/etc/systemd/system"
|
2020-04-09 12:03:26 -07:00
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
cp ./data/thermal-conf.xml $out/etc/thermald/
|
|
|
|
'';
|
2014-08-13 17:17:55 -07:00
|
|
|
|
2015-06-11 17:30:47 -07:00
|
|
|
meta = with stdenv.lib; {
|
2014-08-13 17:17:55 -07:00
|
|
|
description = "Thermal Daemon";
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://01.org/linux-thermal-daemon";
|
2015-06-11 17:30:47 -07:00
|
|
|
license = licenses.gpl2;
|
2017-12-05 13:15:20 -08:00
|
|
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
2015-06-11 17:30:47 -07:00
|
|
|
maintainers = with maintainers; [ abbradar ];
|
2014-08-13 17:17:55 -07:00
|
|
|
};
|
|
|
|
}
|