mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 01:13:05 +00:00
throttled: 0.9.2 -> 0.10.0
This commit is contained in:
parent
1710ed1f6f
commit
77ff624382
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user