nixpkgs/pkgs/tools/misc/ddccontrol/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

67 lines
1.5 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
, intltool
, libxml2
, pciutils
, pkg-config
, gtk2
, ddccontrol-db
2015-02-20 14:26:29 +01:00
}:
stdenv.mkDerivation rec {
2019-08-13 23:52:01 +02:00
pname = "ddccontrol";
2021-10-20 13:26:02 +02:00
version = "0.6.0";
2016-02-09 02:32:47 +01:00
2018-09-18 23:49:11 +02:00
src = fetchFromGitHub {
owner = "ddccontrol";
repo = "ddccontrol";
2021-10-20 13:26:02 +02:00
rev = version;
sha256 = "00pmnzvd4l3w6chzw41mrf1pd7lrcwi1n7320bnq20rn8hsnbnxk";
2015-02-20 14:26:29 +01:00
};
2016-02-09 02:32:47 +01:00
nativeBuildInputs = [
autoreconfHook
intltool
pkg-config
];
buildInputs = [
2018-09-18 23:49:11 +02:00
libxml2
pciutils
gtk2
ddccontrol-db
];
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 = ''
substituteInPlace configure.ac \
--replace \
"\$""{datadir}/ddccontrol-db" \
"${ddccontrol-db}/share/ddccontrol-db"
substituteInPlace src/ddcpci/Makefile.am \
--replace "chmod 4711" "chmod 0711"
'' + lib.optionalString (lib.versionAtLeast "0.6.0" version) ''
# Upstream PR: https://github.com/ddccontrol/ddccontrol/pull/115
substituteInPlace src/lib/Makefile.am \
--replace "/etc/" "\$""{sysconfdir}/"
2018-09-18 23:49:11 +02:00
'';
preConfigure = ''
intltoolize --force
2015-02-20 14:26:29 +01:00
'';
meta = with lib; {
2015-02-20 14:26:29 +01:00
description = "A program used to control monitor parameters by software";
homepage = "https://github.com/ddccontrol/ddccontrol";
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
}