Merge pull request #213317 from kurnevsky/throttled
throttled: fix after recent update
This commit is contained in:
commit
a85007b253
2 changed files with 7 additions and 3 deletions
|
@ -20,7 +20,7 @@ in {
|
|||
config = mkIf cfg.enable {
|
||||
systemd.packages = [ pkgs.throttled ];
|
||||
# The upstream package has this in Install, but that's not enough, see the NixOS manual
|
||||
systemd.services.lenovo_fix.wantedBy = [ "multi-user.target" ];
|
||||
systemd.services.throttled.wantedBy = [ "multi-user.target" ];
|
||||
|
||||
environment.etc."throttled.conf".source =
|
||||
if cfg.extraConfig != ""
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ lib, stdenv, fetchFromGitHub, python3Packages }:
|
||||
{ lib, stdenv, fetchFromGitHub, python3Packages, pciutils }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "throttled";
|
||||
|
@ -20,7 +20,11 @@ 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/throttled.py|' -i systemd/throttled.service'';
|
||||
postPatch = ''
|
||||
sed -e 's|ExecStart=.*|ExecStart=${placeholder "out"}/bin/throttled.py|' -i systemd/throttled.service
|
||||
|
||||
substituteInPlace throttled.py --replace "'setpci'" "'${pciutils}/bin/setpci'"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
|
Loading…
Reference in a new issue