diff options
author | Fabian Affolter <fabian@affolter-engineering.ch> | 2024-05-12 17:44:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-12 17:44:29 +0200 |
commit | 8e1042722a98024f4f33642707eb64b537441de0 (patch) | |
tree | 590215f8c33262bb02a00e15feebac0d9ea0a999 | |
parent | 8ee54174fb368e449f0e6b581f584c58ee7adf83 (diff) | |
parent | 2a2f741d614328a78942440ef3ade904842e375d (diff) |
Merge pull request #311031 from fabaff/hikvision-refactor
python312Packages.hikvision: refactor
-rw-r--r-- | pkgs/development/python-modules/hikvision/default.nix | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/pkgs/development/python-modules/hikvision/default.nix b/pkgs/development/python-modules/hikvision/default.nix index 23f6387853a82..354edc5d77981 100644 --- a/pkgs/development/python-modules/hikvision/default.nix +++ b/pkgs/development/python-modules/hikvision/default.nix @@ -1,35 +1,39 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, requests -, pytestCheckHook +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pytestCheckHook, + pythonOlder, + requests, + setuptools, }: buildPythonPackage rec { pname = "hikvision"; version = "2.0.4"; - format = "setuptools"; + pyproject = true; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "fbradyirl"; - repo = pname; - rev = "v${version}"; - sha256 = "1l0zvir4hf1pcwwcmrhkspbdljzmi4lknxar5bkipdanpsm588mn"; + repo = "hikvision"; + rev = "refs/tags/v${version}"; + hash = "sha256-tiJUqr5WtRvnKll1OymJ9Uva1tUT5so4Zzc4SHLcH9A="; }; - propagatedBuildInputs = [ - requests - ]; + build-system = [ setuptools ]; + + dependencies = [ requests ]; - nativeCheckInputs = [ - pytestCheckHook - ]; + nativeCheckInputs = [ pytestCheckHook ]; pythonImportsCheck = [ "hikvision.api" ]; meta = with lib; { description = "Python module for interacting with Hikvision IP Cameras"; homepage = "https://github.com/fbradyirl/hikvision"; + changelog = "https://github.com/fbradyirl/hikvision/releases/tag/v${version}"; license = with licenses; [ mit ]; maintainers = with maintainers; [ fab ]; }; |