diff options
author | William A. Kennington III <william@wkennington.com> | 2014-03-17 17:33:39 -0500 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-04-16 01:09:57 +0200 |
commit | 171a58bcd68e59d8df461cce133cacb67b488bb2 (patch) | |
tree | 88e627ec97a9d6fb702ab2a822f7c92317b2f302 /pkgs/os-specific/linux/cpupower | |
parent | 2fc520d699a853089cba5fb7c733db0c3789dc7b (diff) |
cpupower: Add package to replace cpufrequtils
Diffstat (limited to 'pkgs/os-specific/linux/cpupower')
-rw-r--r-- | pkgs/os-specific/linux/cpupower/default.nix | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/cpupower/default.nix b/pkgs/os-specific/linux/cpupower/default.nix new file mode 100644 index 0000000000000..bf6e8c36f3dfb --- /dev/null +++ b/pkgs/os-specific/linux/cpupower/default.nix @@ -0,0 +1,42 @@ +{ stdenv, fetchurl, kernel, coreutils, pciutils, gettext }: + +stdenv.mkDerivation { + name = "cpupower-${kernel.version}"; + + src = kernel.src; + + buildInputs = [ coreutils pciutils gettext ]; + + configurePhase = '' + cd tools/power/cpupower + sed -i 's,/bin/true,${coreutils}/bin/true,' Makefile + sed -i 's,/bin/pwd,${coreutils}/bin/pwd,' Makefile + sed -i 's,/usr/bin/install,${coreutils}/bin/install,' Makefile + ''; + + buildPhase = '' + make + ''; + + installPhase = '' + make \ + bindir="$out/bin" \ + sbindir="$out/sbin" \ + mandir="$out/share/man" \ + includedir="$out/include" \ + libdir="$out/lib" \ + localedir="$out/share/locale" \ + docdir="$out/share/doc/cpupower" \ + confdir="$out/etc" \ + install install-man + ''; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + description = "Tool to examine and tune power saving features."; + homepage = https://www.kernel.org.org/; + license = licenses.gpl2; + platforms = platforms.linux; + }; +} |