diff --git a/nixos/modules/programs/coolercontrol.nix b/nixos/modules/programs/coolercontrol.nix index 000fb091bcc6..7103526d79b5 100644 --- a/nixos/modules/programs/coolercontrol.nix +++ b/nixos/modules/programs/coolercontrol.nix @@ -34,13 +34,11 @@ in systemd = { packages = with pkgs.coolercontrol; [ - coolercontrol-liqctld coolercontrold ]; # https://github.com/NixOS/nixpkgs/issues/81138 services = { - coolercontrol-liqctld.wantedBy = [ "multi-user.target" ]; coolercontrold.wantedBy = [ "multi-user.target" ]; }; }; diff --git a/pkgs/applications/system/coolercontrol/coolercontrol-liqctld.nix b/pkgs/applications/system/coolercontrol/coolercontrol-liqctld.nix deleted file mode 100644 index 2dc770421e9f..000000000000 --- a/pkgs/applications/system/coolercontrol/coolercontrol-liqctld.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ 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-fail '/usr/bin' "$out/bin" - ''; - - meta = meta // { - description = "${meta.description} (Liquidctl Daemon)"; - mainProgram = "coolercontrol-liqctld"; - }; -} diff --git a/pkgs/applications/system/coolercontrol/coolercontrol-ui-data.nix b/pkgs/applications/system/coolercontrol/coolercontrol-ui-data.nix index 0f687c9d5278..d2af32efee38 100644 --- a/pkgs/applications/system/coolercontrol/coolercontrol-ui-data.nix +++ b/pkgs/applications/system/coolercontrol/coolercontrol-ui-data.nix @@ -11,7 +11,7 @@ buildNpmPackage { inherit version src; sourceRoot = "${src.name}/coolercontrol-ui"; - npmDepsHash = "sha256-FFVCE3/E+eiTvTeU53cc1Mdbrl5J3+YgYUYltpnGXz0="; + npmDepsHash = "sha256-MhMHo6wjkaSCyevwzAKCvSsJTmAq9rYFG1ZVUAkRc0Y="; postBuild = '' cp -r dist $out diff --git a/pkgs/applications/system/coolercontrol/coolercontrold.nix b/pkgs/applications/system/coolercontrol/coolercontrold.nix index 7bdaa624ac68..50987847a587 100644 --- a/pkgs/applications/system/coolercontrol/coolercontrold.nix +++ b/pkgs/applications/system/coolercontrol/coolercontrold.nix @@ -5,6 +5,8 @@ coolercontrol, runtimeShell, addDriverRunpath, + python3Packages, + liquidctl, }: { @@ -18,10 +20,16 @@ rustPlatform.buildRustPackage { inherit version src; sourceRoot = "${src.name}/coolercontrold"; - cargoHash = "sha256-ZyYyQcaYd3VZ7FL0Hki33JO3LscPfBT5gl+nw2cXvUs="; + cargoHash = "sha256-4aSEEBtxwTyAx5CPa2fDBhx5U+Ql2X/tKPQHLIsm3I0="; buildInputs = [ libdrm ]; - nativeBuildInputs = [ addDriverRunpath ]; + + nativeBuildInputs = [ + addDriverRunpath + python3Packages.wrapPython + ]; + + pythonPath = [ liquidctl ]; postPatch = '' # copy the frontend static resources to a directory for embedding @@ -41,12 +49,15 @@ rustPlatform.buildRustPackage { postFixup = '' addDriverRunpath "$out/bin/coolercontrold" + + buildPythonPath "$pythonPath" + wrapProgram "$out/bin/coolercontrold" \ + --prefix PATH : $program_PATH \ + --prefix PYTHONPATH : $program_PYTHONPATH ''; passthru.tests.version = testers.testVersion { package = coolercontrol.coolercontrold; - # coolercontrold prints its version with "v" prefix - version = "v${version}"; }; meta = meta // { diff --git a/pkgs/applications/system/coolercontrol/default.nix b/pkgs/applications/system/coolercontrol/default.nix index 009525ec8eb3..d11e7f40aa6c 100644 --- a/pkgs/applications/system/coolercontrol/default.nix +++ b/pkgs/applications/system/coolercontrol/default.nix @@ -5,20 +5,23 @@ }: let - version = "2.1.0"; + version = "3.0.1"; src = fetchFromGitLab { owner = "coolercontrol"; repo = "coolercontrol"; rev = version; - hash = "sha256-xIc0ZecQGyjMQWVaucKomu7SbaHy+ymg5dkOjHjtJ9c="; + hash = "sha256-PvEj3xYJVpHNfd5p7kyw+eW9S/g1FB/YiFgWEJDDbus="; }; meta = { description = "Monitor and control your cooling devices"; homepage = "https://gitlab.com/coolercontrol/coolercontrol"; license = lib.licenses.gpl3Plus; - platforms = [ "x86_64-linux" ]; + platforms = [ + "x86_64-linux" + "aarch64-linux" + ]; maintainers = with lib.maintainers; [ codifryed OPNA2608 @@ -33,6 +36,4 @@ in coolercontrold = applySharedDetails (callPackage ./coolercontrold.nix { }); coolercontrol-gui = applySharedDetails (callPackage ./coolercontrol-gui.nix { }); - - coolercontrol-liqctld = applySharedDetails (callPackage ./coolercontrol-liqctld.nix { }); }