2021-02-11 08:26:20 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
|
|
|
, intltool
|
|
|
|
, libxml2
|
|
|
|
, pciutils
|
|
|
|
, pkg-config
|
|
|
|
, gtk2
|
|
|
|
, ddccontrol-db
|
2015-02-20 14:26:29 +01:00
|
|
|
}:
|
|
|
|
|
2017-07-29 11:35:49 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-13 23:52:01 +02:00
|
|
|
pname = "ddccontrol";
|
2021-05-06 04:53:01 +02:00
|
|
|
version = "0.5.2";
|
2016-02-09 02:32:47 +01:00
|
|
|
|
2018-09-18 23:49:11 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ddccontrol";
|
|
|
|
repo = "ddccontrol";
|
2021-05-06 04:53:01 +02:00
|
|
|
rev = "0.5.2";
|
|
|
|
sha256 = "sha256-kul0sjbwbCwadvrccG3KwL/fKWACFUg74QGvgfWE4FQ=";
|
2015-02-20 14:26:29 +01:00
|
|
|
};
|
2016-02-09 02:32:47 +01:00
|
|
|
|
2021-02-11 08:26:20 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
intltool
|
|
|
|
pkg-config
|
|
|
|
];
|
2016-08-24 23:06:43 +02:00
|
|
|
|
|
|
|
buildInputs = [
|
2018-09-18 23:49:11 +02:00
|
|
|
libxml2
|
|
|
|
pciutils
|
|
|
|
gtk2
|
|
|
|
ddccontrol-db
|
2016-08-24 23:06:43 +02:00
|
|
|
];
|
|
|
|
|
2021-07-08 21:29:39 +02:00
|
|
|
configureFlags = [
|
|
|
|
"--with-systemdsystemunitdir=${placeholder "out"}/etc/systemd/system"
|
|
|
|
];
|
|
|
|
|
2015-02-20 14:26:29 +01:00
|
|
|
prePatch = ''
|
2018-09-18 23:49:11 +02:00
|
|
|
oldPath="\$""{datadir}/ddccontrol-db"
|
|
|
|
newPath="${ddccontrol-db}/share/ddccontrol-db"
|
|
|
|
sed -i -e "s|$oldPath|$newPath|" configure.ac
|
|
|
|
sed -i -e "s/chmod 4711/chmod 0711/" src/ddcpci/Makefile*
|
|
|
|
'';
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
intltoolize --force
|
2015-02-20 14:26:29 +01:00
|
|
|
'';
|
2015-03-16 21:27:37 +01:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2015-02-20 14:26:29 +01:00
|
|
|
description = "A program used to control monitor parameters by software";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/ddccontrol/ddccontrol";
|
2021-02-11 08:26:20 +01:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with lib.maintainers; [ pakhfn ];
|
2015-02-20 14:26:29 +01:00
|
|
|
};
|
2015-02-19 22:49:31 +01:00
|
|
|
}
|