diff options
author | Aleksey Kladov <aleksey.kladov@gmail.com> | 2022-12-15 14:39:18 +0000 |
---|---|---|
committer | Aleksey Kladov <aleksey.kladov@gmail.com> | 2022-12-15 14:51:05 +0000 |
commit | 77ff62438226498540dafe681e13cc8ef1551c8c (patch) | |
tree | a5f21d34a9b293a8c15d47c6abcccf18a8360679 | |
parent | 1710ed1f6f8ceb75cf7d1cf55ee0cc21760e1c7a (diff) |
throttled: 0.9.2 -> 0.10.0
-rw-r--r-- | nixos/modules/services/hardware/throttled.nix | 6 | ||||
-rw-r--r-- | pkgs/tools/system/throttled/default.nix | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/nixos/modules/services/hardware/throttled.nix b/nixos/modules/services/hardware/throttled.nix index 99735ff6519d..2d801a7e838f 100644 --- a/nixos/modules/services/hardware/throttled.nix +++ b/nixos/modules/services/hardware/throttled.nix @@ -22,10 +22,10 @@ in { # The upstream package has this in Install, but that's not enough, see the NixOS manual systemd.services.lenovo_fix.wantedBy = [ "multi-user.target" ]; - environment.etc."lenovo_fix.conf".source = + environment.etc."throttled.conf".source = if cfg.extraConfig != "" - then pkgs.writeText "lenovo_fix.conf" cfg.extraConfig - else "${pkgs.throttled}/etc/lenovo_fix.conf"; + then pkgs.writeText "throttled.conf" cfg.extraConfig + else "${pkgs.throttled}/etc/throttled.conf"; # Kernel 5.9 spams warnings whenever userspace writes to CPU MSRs. # See https://github.com/erpalma/throttled/issues/215 diff --git a/pkgs/tools/system/throttled/default.nix b/pkgs/tools/system/throttled/default.nix index 2729a16b8687..efbc9ed3dd3f 100644 --- a/pkgs/tools/system/throttled/default.nix +++ b/pkgs/tools/system/throttled/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "throttled"; - version = "0.9.2"; + version = "0.10.0"; src = fetchFromGitHub { owner = "erpalma"; repo = pname; rev = "v${version}"; - sha256 = "sha256-4aDa6REDHO7gr1czIv6NlepeMVJI93agxJjE2vHiEmk="; + sha256 = "sha256-0MsPp6y4r/uZB2SplKV+SAiJoxIs2jgOQmQoQQ2ZKwI="; }; nativeBuildInputs = [ python3Packages.wrapPython ]; @@ -20,12 +20,12 @@ stdenv.mkDerivation rec { ]; # The upstream unit both assumes the install location, and tries to run in a virtualenv - postPatch = ''sed -e 's|ExecStart=.*|ExecStart=${placeholder "out"}/bin/lenovo_fix.py|' -i systemd/lenovo_fix.service''; + postPatch = ''sed -e 's|ExecStart=.*|ExecStart=${placeholder "out"}/bin/throttled.py|' -i systemd/throttled.service''; installPhase = '' runHook preInstall - install -D -m755 -t $out/bin lenovo_fix.py - install -D -t $out/bin lenovo_fix.py mmio.py + install -D -m755 -t $out/bin throttled.py + install -D -t $out/bin throttled.py mmio.py install -D -m644 -t $out/etc etc/* install -D -m644 -t $out/lib/systemd/system systemd/* runHook postInstall |