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

57 lines
1.1 KiB
Nix
Raw Normal View History

2015-02-20 13:26:29 +00:00
{ stdenv
, fetchurl
, intltool
, libtool
, autoconf
, automake110x
, perl
, perlPackages
, libxml2
, pciutils
, pkgconfig
, gtk
, ddccontrol-db
}:
2015-02-19 21:49:31 +00:00
let version = "0.4.2"; in
let verName = "${version}"; in
stdenv.mkDerivation {
2015-02-20 13:26:29 +00:00
name = "ddccontrol-${verName}";
src = fetchurl {
url = "mirror://sourceforge/ddccontrol/ddccontrol-${version}.tar.bz2";
sha1 = "fd5c53286315a61a18697a950e63ed0c8d5acff1";
};
buildInputs =
[ stdenv
intltool
libtool
autoconf
automake110x
perl
perlPackages.libxml_perl
libxml2
pciutils
pkgconfig
gtk
ddccontrol-db
];
2015-02-19 21:49:31 +00:00
2015-02-20 13:26:29 +00:00
prePatch = ''
newPath=$(echo "${ddccontrol-db}/share/ddccontrol-db" | sed "s/\\//\\\\\\//g")
2015-02-19 21:49:31 +00:00
mv configure.ac configure.ac.old
2015-02-20 13:26:29 +00:00
oldPath="\$"
oldPath+="{datadir}\/ddccontrol-db"
sed "s/$oldPath/$newPath/" <configure.ac.old >configure.ac
2015-02-19 21:49:31 +00:00
rm configure.ac.old
2015-02-20 13:26:29 +00:00
'';
preConfigure = ''
2015-02-19 21:49:31 +00:00
autoreconf --install
2015-02-20 13:26:29 +00:00
'';
2015-02-19 21:49:31 +00:00
2015-02-20 13:26:29 +00:00
meta = with stdenv.lib; {
description = "A program used to control monitor parameters by software";
license = licenses.gpl2;
platforms = platforms.linux;
};
2015-02-19 21:49:31 +00:00
}