2021-02-11 07:26:20 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2023-11-09 14:57:18 +00:00
|
|
|
, fetchpatch
|
2021-02-11 07:26:20 +00:00
|
|
|
, autoreconfHook
|
|
|
|
, intltool
|
|
|
|
, libxml2
|
|
|
|
, pciutils
|
|
|
|
, pkg-config
|
|
|
|
, gtk2
|
|
|
|
, ddccontrol-db
|
2015-02-20 13:26:29 +00:00
|
|
|
}:
|
|
|
|
|
2017-07-29 09:35:49 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-13 21:52:01 +00:00
|
|
|
pname = "ddccontrol";
|
2023-10-16 11:02:22 +00:00
|
|
|
version = "1.0.0";
|
2016-02-09 01:32:47 +00:00
|
|
|
|
2018-09-18 21:49:11 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ddccontrol";
|
|
|
|
repo = "ddccontrol";
|
2021-10-20 11:26:02 +00:00
|
|
|
rev = version;
|
2023-10-16 11:02:22 +00:00
|
|
|
sha256 = "sha256-100SITpGbui/gRhFjVZxn6lZRB0najtGHd18oUpByJo=";
|
2015-02-20 13:26:29 +00:00
|
|
|
};
|
2016-02-09 01:32:47 +00:00
|
|
|
|
2021-02-11 07:26:20 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
intltool
|
|
|
|
pkg-config
|
|
|
|
];
|
2016-08-24 21:06:43 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
2018-09-18 21:49:11 +00:00
|
|
|
libxml2
|
|
|
|
pciutils
|
|
|
|
gtk2
|
|
|
|
ddccontrol-db
|
2016-08-24 21:06:43 +00:00
|
|
|
];
|
|
|
|
|
2023-11-09 14:57:18 +00:00
|
|
|
patches = [
|
|
|
|
# Upstream commit, fixed the version number in v1.0.0
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/ddccontrol/ddccontrol/commit/fc8c5b5d0f2b64b08b95f4a7d8f47f2fd8ceec34.patch";
|
|
|
|
hash = "sha256-SB1BaolTNCUYgj38nMg1uLUqOHvnwCr8T3cnfu/7rjI=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-07-08 19:29:39 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--with-systemdsystemunitdir=${placeholder "out"}/etc/systemd/system"
|
|
|
|
];
|
|
|
|
|
2015-02-20 13:26:29 +00:00
|
|
|
prePatch = ''
|
2021-11-24 01:56:18 +00:00
|
|
|
substituteInPlace configure.ac \
|
|
|
|
--replace \
|
|
|
|
"\$""{datadir}/ddccontrol-db" \
|
|
|
|
"${ddccontrol-db}/share/ddccontrol-db"
|
|
|
|
|
|
|
|
substituteInPlace src/ddcpci/Makefile.am \
|
|
|
|
--replace "chmod 4711" "chmod 0711"
|
2018-09-18 21:49:11 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
intltoolize --force
|
2015-02-20 13:26:29 +00:00
|
|
|
'';
|
2015-03-16 20:27:37 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2015-02-20 13:26:29 +00:00
|
|
|
description = "A program used to control monitor parameters by software";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/ddccontrol/ddccontrol";
|
2021-02-11 07:26:20 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with lib.maintainers; [ pakhfn ];
|
2015-02-20 13:26:29 +00:00
|
|
|
};
|
2015-02-19 21:49:31 +00:00
|
|
|
}
|