2021-02-13 14:23:35 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
|
|
|
, intltool
|
|
|
|
, libxml2
|
|
|
|
, pciutils
|
|
|
|
, pkg-config
|
|
|
|
, gtk2
|
|
|
|
, ddccontrol-db
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ddccontrol";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "0.6.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ddccontrol";
|
|
|
|
repo = "ddccontrol";
|
2022-02-10 20:34:41 +00:00
|
|
|
rev = version;
|
2023-10-09 19:29:22 +00:00
|
|
|
sha256 = "sha256-0mvkIW0Xsi7co/INmlNeTclBxGoqoJliFanA/RFMaLM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
intltool
|
|
|
|
pkg-config
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libxml2
|
|
|
|
pciutils
|
|
|
|
gtk2
|
|
|
|
ddccontrol-db
|
|
|
|
];
|
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--with-systemdsystemunitdir=${placeholder "out"}/etc/systemd/system"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
prePatch = ''
|
2022-02-10 20:34:41 +00:00
|
|
|
substituteInPlace configure.ac \
|
|
|
|
--replace \
|
|
|
|
"\$""{datadir}/ddccontrol-db" \
|
|
|
|
"${ddccontrol-db}/share/ddccontrol-db"
|
|
|
|
|
|
|
|
substituteInPlace src/ddcpci/Makefile.am \
|
|
|
|
--replace "chmod 4711" "chmod 0711"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
intltoolize --force
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A program used to control monitor parameters by software";
|
|
|
|
homepage = "https://github.com/ddccontrol/ddccontrol";
|
2021-02-13 14:23:35 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with lib.maintainers; [ pakhfn ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|