about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pytrydan
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-11-16 12:53:32 +0100
committerAlyssa Ross <hi@alyssa.is>2023-11-16 12:53:32 +0100
commit67419f0e56f99b0ebbe14574d3492110ac84c8d6 (patch)
tree3abc8e1606a2c80b6f5d14fef175e50800202163 /nixpkgs/pkgs/development/python-modules/pytrydan
parenta2c1eff83c3118a9aee8076c7f84f58137416b6e (diff)
parent9008bc4eb62c878d0812105ea1b34255d651df88 (diff)
downloadnixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.tar
nixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.tar.gz
nixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.tar.bz2
nixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.tar.lz
nixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.tar.xz
nixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.tar.zst
nixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.zip
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs into HEAD
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pytrydan')
-rw-r--r--nixpkgs/pkgs/development/python-modules/pytrydan/default.nix66
1 files changed, 66 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pytrydan/default.nix b/nixpkgs/pkgs/development/python-modules/pytrydan/default.nix
new file mode 100644
index 000000000000..ef54cf77b4f2
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/pytrydan/default.nix
@@ -0,0 +1,66 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, httpx
+, orjson
+, poetry-core
+, pytest-asyncio
+, pytestCheckHook
+, pythonOlder
+, respx
+, rich
+, syrupy
+, tenacity
+, typer
+}:
+
+buildPythonPackage rec {
+  pname = "pytrydan";
+  version = "0.4.0";
+  pyproject = true;
+
+  disabled = pythonOlder "3.10";
+
+  src = fetchFromGitHub {
+    owner = "dgomes";
+    repo = "pytrydan";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-9PyRICtZ+0Ezinu28oFgFOSnOyCmD7zZbdc/chN+sCo=";
+  };
+
+  postPatch = ''
+    substituteInPlace pyproject.toml \
+      --replace " --cov=pytrydan --cov-report=term-missing:skip-covered" ""
+  '';
+
+  nativeBuildInputs = [
+    poetry-core
+  ];
+
+  propagatedBuildInputs = [
+    httpx
+    orjson
+    rich
+    tenacity
+    typer
+  ];
+
+  nativeCheckInputs = [
+    pytest-asyncio
+    pytestCheckHook
+    respx
+    syrupy
+  ];
+
+  pythonImportsCheck = [
+    "pytrydan"
+  ];
+
+  meta = with lib; {
+    description = "Library to interface with V2C EVSE Trydan";
+    homepage = "https://github.com/dgomes/pytrydan";
+    changelog = "https://github.com/dgomes/pytrydan/blob/${version}/CHANGELOG.md";
+    license = licenses.mit;
+    maintainers = with maintainers; [ fab ];
+  };
+}