19 stdenv.mkDerivation rec {
23 src = fetchFromGitHub {
26 rev = "refs/tags/v${version}";
27 hash = "sha256-53jfqt0dtMqMj3W3m6ravUTzApLQcljDHfdXejeZa4M=";
50 substituteInPlace src/main.cpp --replace-fail "/sbin/modprobe" "modprobe"
51 substituteInPlace src/calibrate/calibrate.cpp --replace-fail "/usr/bin/xset" "${lib.getExe xorg.xset}"
52 substituteInPlace src/tuning/bluetooth.cpp --replace-fail "/usr/bin/hcitool" "hcitool"
56 updateScript = nix-update-script { };
57 tests.version = testers.testVersion {
59 command = "powertop --version";
65 inherit (src.meta) homepage;
66 changelog = "https://github.com/fenrus75/powertop/releases/tag/v${version}";
67 description = "Analyze power consumption on Intel-based laptops";
68 mainProgram = "powertop";
69 license = licenses.gpl2Only;
70 maintainers = with maintainers; [
74 platforms = platforms.linux;