From f4cb17d383d01ae9c020d0f47e8590e99b482cd6 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 28 Jan 2023 16:31:29 +0100 Subject: [PATCH 1/3] python3Packages.huum: add changelog to meta --- pkgs/development/python-modules/huum/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/huum/default.nix b/pkgs/development/python-modules/huum/default.nix index 0df01749e953..2da86db365a7 100644 --- a/pkgs/development/python-modules/huum/default.nix +++ b/pkgs/development/python-modules/huum/default.nix @@ -16,7 +16,7 @@ buildPythonPackage rec { src = fetchPypi { inherit pname version; - sha256 = "sha256-PYOjfLPa/vZZP0IZuUZnQ74IrTRvizgYhKOmhd83aMQ="; + hash = "sha256-PYOjfLPa/vZZP0IZuUZnQ74IrTRvizgYhKOmhd83aMQ="; }; nativeBuildInputs = [ @@ -39,6 +39,7 @@ buildPythonPackage rec { meta = with lib; { description = "Library for for Huum saunas"; homepage = "https://github.com/frwickst/pyhuum"; + changelog = "https://github.com/frwickst/pyhuum/releases/tag/${version}"; license = with licenses; [ mit ]; maintainers = with maintainers; [ fab ]; }; From 8d9f8e9bcfe5adf877276cd9863f777bb3572fb7 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 28 Jan 2023 16:32:14 +0100 Subject: [PATCH 2/3] python3Packages.huum: 0.6.0 -> 0.7.1 Changelog: https://github.com/frwickst/pyhuum/releases/tag/0.7.1 --- pkgs/development/python-modules/huum/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/huum/default.nix b/pkgs/development/python-modules/huum/default.nix index 2da86db365a7..bc9861d5aa4e 100644 --- a/pkgs/development/python-modules/huum/default.nix +++ b/pkgs/development/python-modules/huum/default.nix @@ -9,14 +9,14 @@ buildPythonPackage rec { pname = "huum"; - version = "0.6.0"; + version = "0.7.1"; format = "pyproject"; disabled = pythonOlder "3.9"; src = fetchPypi { inherit pname version; - hash = "sha256-PYOjfLPa/vZZP0IZuUZnQ74IrTRvizgYhKOmhd83aMQ="; + hash = "sha256-/NWeQfYmSRiWH/9lfpRZbpKygC5m/bTjogK/1UGdH2Y="; }; nativeBuildInputs = [ From 8f3f1e97045d600519e58b6dd381c8c1297dfca4 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 28 Jan 2023 16:34:56 +0100 Subject: [PATCH 3/3] python3Packages.huum: enable tests --- .../python-modules/huum/default.nix | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/huum/default.nix b/pkgs/development/python-modules/huum/default.nix index bc9861d5aa4e..68cba094ab31 100644 --- a/pkgs/development/python-modules/huum/default.nix +++ b/pkgs/development/python-modules/huum/default.nix @@ -1,9 +1,11 @@ { lib , aiohttp , buildPythonPackage -, fetchPypi +, fetchFromGitHub , poetry-core , pydantic +, pytest-asyncio +, pytestCheckHook , pythonOlder }: @@ -14,9 +16,11 @@ buildPythonPackage rec { disabled = pythonOlder "3.9"; - src = fetchPypi { - inherit pname version; - hash = "sha256-/NWeQfYmSRiWH/9lfpRZbpKygC5m/bTjogK/1UGdH2Y="; + src = fetchFromGitHub { + owner = "frwickst"; + repo = "pyhuum"; + rev = "refs/tags/${version}"; + hash = "sha256-vYHwcEOzxYEBav5YbmWpm+izFlivzu2UIR6hmAXXi0U="; }; nativeBuildInputs = [ @@ -28,16 +32,17 @@ buildPythonPackage rec { pydantic ]; - # Tests are not shipped and source not tagged - # https://github.com/frwickst/pyhuum/issues/2 - doCheck = false; + nativeCheckInputs = [ + pytest-asyncio + pytestCheckHook + ]; pythonImportsCheck = [ "huum" ]; meta = with lib; { - description = "Library for for Huum saunas"; + description = "Library for Huum saunas"; homepage = "https://github.com/frwickst/pyhuum"; changelog = "https://github.com/frwickst/pyhuum/releases/tag/${version}"; license = with licenses; [ mit ];