depot/third_party/nixpkgs/pkgs/applications/system/coolercontrol/coolercontrol-liqctld.nix
Default email 587713944a Project import generated by Copybara.
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
2024-04-21 17:54:59 +02:00

36 lines
764 B
Nix

{ python3
}:
{ version
, src
, meta
}:
python3.pkgs.buildPythonApplication {
pname = "coolercontrol-liqctld";
inherit version src;
sourceRoot = "${src.name}/coolercontrol-liqctld";
format = "pyproject";
nativeBuildInputs = with python3.pkgs; [
setuptools
];
propagatedBuildInputs = with python3.pkgs; [
liquidctl
setproctitle
fastapi
uvicorn
];
postInstall = ''
install -Dm444 "${src}/packaging/systemd/coolercontrol-liqctld.service" -t "$out/lib/systemd/system"
substituteInPlace "$out/lib/systemd/system/coolercontrol-liqctld.service" \
--replace '/usr/bin' "$out/bin"
'';
meta = meta // {
description = "${meta.description} (Liquidctl Daemon)";
mainProgram = "coolercontrol-liqctld";
};
}