Unverified Commit dd9082a2 authored by zimward's avatar zimward
Browse files

pid-fan-controller: 0.1.1 -> 0.1.3

parent 4bd9165a
Loading
Loading
Loading
Loading
+13 −4
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
  lib,
}:
let
  version = "0.1.1";
  version = "0.1.3";
in
rustPlatform.buildRustPackage {
  pname = "pid-fan-controller";
@@ -13,10 +13,19 @@ rustPlatform.buildRustPackage {
  src = fetchFromGitHub {
    owner = "zimward";
    repo = "pid-fan-controller";
    rev = version;
    hash = "sha256-ALR9Qa0AhcGyc3+7x5CEG/72+bJzhaEoIvQNL+QjldY=";
    tag = version;
    hash = "sha256-BgBFX4x1gMSMla7lhkFk1n5fBC1TFK0Z5Z3mFH2oBF0=";
  };
  cargoHash = "sha256-Y57VSheI94b43SwNCDdFvcNxzkA16KObBvzZ6ywYAyU=";
  cargoHash = "sha256-AN7EbjKZBxb8UP0MEbJUw5Y8E/rE35MByKVmxX2ctko=";

  postPatch = ''
    substituteInPlace resources/pid-fan-controller.service \
      --replace-fail '/usr/bin' "$out/bin"
  '';
  postInstall = ''
    install -Dm0644 resources/pid-fan-controller.service $out/lib/systemd/system/pid-fan-controller.service
    install -Dm0644 resources/pid-fan-controller-sleep.service $out/lib/systemd/system/pid-fan-controller-sleep.service
  '';

  meta = {
    description = "Service to provide closed-loop PID fan control";