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

42 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, autoreconfHook, intltool, perl, perlPackages, libxml2
, pciutils, pkgconfig, gtk2, ddccontrol-db
2015-02-20 16:26:29 +03:00
}:
2015-02-20 00:49:31 +03:00
let version = "0.4.2"; in
stdenv.mkDerivation {
name = "ddccontrol-${version}";
2016-02-09 04:32:47 +03:00
2015-02-20 16:26:29 +03:00
src = fetchurl {
url = "mirror://sourceforge/ddccontrol/ddccontrol-${version}.tar.bz2";
sha1 = "fd5c53286315a61a18697a950e63ed0c8d5acff1";
};
2016-02-09 04:32:47 +03:00
nativeBuildInputs = [ autoreconfHook intltool pkgconfig ];
buildInputs = [
perl perlPackages.libxml_perl libxml2 pciutils gtk2 ddccontrol-db
];
patches = [ ./automake.patch ];
hardeningDisable = [ "format" ];
2016-02-09 04:32:47 +03:00
2015-02-20 16:26:29 +03:00
prePatch = ''
newPath=$(echo "${ddccontrol-db}/share/ddccontrol-db" | sed "s/\\//\\\\\\//g")
2015-02-20 00:49:31 +03:00
mv configure.ac configure.ac.old
2015-02-20 16:26:29 +03:00
oldPath="\$"
oldPath+="{datadir}\/ddccontrol-db"
sed "s/$oldPath/$newPath/" <configure.ac.old >configure.ac
rm configure.ac.old
2015-02-20 16:26:29 +03:00
'';
2015-02-20 16:26:29 +03:00
meta = with stdenv.lib; {
description = "A program used to control monitor parameters by software";
homepage = "http://ddccontrol.sourceforge.net/";
2015-02-20 16:26:29 +03:00
license = licenses.gpl2;
platforms = platforms.linux;
2015-02-20 16:53:16 +03:00
maintainers = [ stdenv.lib.maintainers.pakhfn ];
2015-02-20 16:26:29 +03:00
};
2015-02-20 00:49:31 +03:00
}