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

60 lines
1.2 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
, intltool
, libxml2
, pciutils
, pkg-config
, gtk2
, ddccontrol-db
2015-02-20 13:26:29 +00:00
}:
stdenv.mkDerivation rec {
2019-08-13 22:52:01 +01:00
pname = "ddccontrol";
2021-05-06 03:53:01 +01:00
version = "0.5.2";
2016-02-09 01:32:47 +00:00
2018-09-18 22:49:11 +01:00
src = fetchFromGitHub {
owner = "ddccontrol";
repo = "ddccontrol";
2021-05-06 03:53:01 +01:00
rev = "0.5.2";
sha256 = "sha256-kul0sjbwbCwadvrccG3KwL/fKWACFUg74QGvgfWE4FQ=";
2015-02-20 13:26:29 +00:00
};
2016-02-09 01:32:47 +00:00
nativeBuildInputs = [
autoreconfHook
intltool
pkg-config
];
buildInputs = [
2018-09-18 22:49:11 +01:00
libxml2
pciutils
gtk2
ddccontrol-db
];
2021-07-08 20:29:39 +01:00
configureFlags = [
"--with-systemdsystemunitdir=${placeholder "out"}/etc/systemd/system"
];
2015-02-20 13:26:29 +00:00
prePatch = ''
2018-09-18 22:49:11 +01: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 13:26:29 +00:00
'';
meta = with lib; {
2015-02-20 13:26:29 +00: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 13:26:29 +00:00
};
2015-02-19 21:49:31 +00:00
}