Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, buildPackages, kernel, pciutils, gettext }: 2 3stdenv.mkDerivation { 4 pname = "cpupower"; 5 inherit (kernel) version src; 6 7 nativeBuildInputs = [ gettext ]; 8 buildInputs = [ pciutils ]; 9 10 postPatch = '' 11 cd tools/power/cpupower 12 sed -i 's,/bin/true,${buildPackages.coreutils}/bin/true,' Makefile 13 sed -i 's,/bin/pwd,${buildPackages.coreutils}/bin/pwd,' Makefile 14 sed -i 's,/usr/bin/install,${buildPackages.coreutils}/bin/install,' Makefile 15 ''; 16 17 makeFlags = [ 18 "CROSS=${stdenv.cc.targetPrefix}" 19 "CC=${stdenv.cc.targetPrefix}cc" 20 "LD=${stdenv.cc.targetPrefix}cc" 21 ]; 22 23 installFlags = lib.mapAttrsToList 24 (n: v: "${n}dir=${placeholder "out"}/${v}") { 25 bin = "bin"; 26 sbin = "sbin"; 27 man = "share/man"; 28 include = "include"; 29 lib = "lib"; 30 locale = "share/locale"; 31 doc = "share/doc/cpupower"; 32 conf = "etc"; 33 bash_completion_ = "share/bash-completion/completions"; 34 }; 35 36 enableParallelBuilding = true; 37 38 meta = with lib; { 39 description = "Tool to examine and tune power saving features"; 40 homepage = "https://www.kernel.org/"; 41 license = licenses.gpl2; 42 platforms = platforms.linux; 43 }; 44}