Commit 1ab0c809 authored by Fabian Affolter's avatar Fabian Affolter
Browse files
parent 4f8ddcdf
Loading
Loading
Loading
Loading
+16 −9
Original line number Diff line number Diff line
@@ -5,28 +5,34 @@
, requests
, pytestCheckHook
, pythonOlder
, setuptools
, wheel
}:

buildPythonPackage rec {
  pname = "heatzypy";
  version = "2.1.5";
  format = "setuptools";
  version = "2.1.7";
  pyproject = true;

  disabled = pythonOlder "3.8";
  disabled = pythonOlder "3.11";

  src = fetchFromGitHub {
    owner = "Cyr-ius";
    repo = pname;
    repo = "heatzypy";
    rev = "refs/tags/${version}";
    hash = "sha256-Z60apquRzhkPbxgGKgDswtW9GUXGt9MbdAsh3Yh31b0=";
    hash = "sha256-bMhxxVZs6fTKlUWtSO0jfzYCHa1WPf2faEjfrmfUg8E=";
  };

  postPatch = ''
    # https://github.com/Cyr-ius/heatzypy/issues/7
    substituteInPlace setup.py \
      --replace 'version="replace_by_workflow"' 'version="${version}"'
    substituteInPlace pyproject.toml \
      --replace "replace_by_workflow" "${version}"
  '';

  nativeBuildInputs = [
    setuptools
    wheel
  ];

  propagatedBuildInputs = [
    aiohttp
    requests
@@ -40,8 +46,9 @@ buildPythonPackage rec {
  ];

  meta = with lib; {
    description = "Python module to interact with Heatzy devices";
    description = "Module to interact with Heatzy devices";
    homepage = "https://github.com/Cyr-ius/heatzypy";
    changelog = "https://github.com/cyr-ius/heatzypy/releases/tag/${version}";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ fab ];
  };