about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2024-04-23 13:13:08 +0200
committerGitHub <noreply@github.com>2024-04-23 13:13:08 +0200
commit422b69f54c1b35f76762df5e395f2db9db6dcf9f (patch)
tree62a2530b02f801b8d1efe432128a2b39d863a99d
parentb53ce73d70bf254d078785aa3858fe3a053f2cfe (diff)
parent5639d22cf703156df6db3a93d232c0ea56485c48 (diff)
Merge pull request #306203 from fabaff/azure-refactor
python312Packages.azure-cosmos: refactor
-rw-r--r--pkgs/development/python-modules/azure-cosmos/default.nix35
1 files changed, 24 insertions, 11 deletions
diff --git a/pkgs/development/python-modules/azure-cosmos/default.nix b/pkgs/development/python-modules/azure-cosmos/default.nix
index 535a4664514f..df687eb52ac5 100644
--- a/pkgs/development/python-modules/azure-cosmos/default.nix
+++ b/pkgs/development/python-modules/azure-cosmos/default.nix
@@ -1,30 +1,43 @@
-{ buildPythonPackage
-, lib
-, fetchPypi
-, six
-, requests
+{
+  lib,
+  azure-core,
+  buildPythonPackage,
+  fetchPypi,
+  pythonOlder,
+  setuptools,
+  typing-extensions,
 }:
 
 buildPythonPackage rec {
-  version = "4.6.0";
-  format = "setuptools";
   pname = "azure-cosmos";
+  version = "4.6.0";
+  pyproject = true;
+
+  disabled = pythonOlder "3.8";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-2uxqwgHGRzsJK2Ku5x44G+62w6jcNhJJgytwSMTwYeI=";
+    hash = "sha256-2uxqwgHGRzsJK2Ku5x44G+62w6jcNhJJgytwSMTwYeI=";
   };
 
-  propagatedBuildInputs = [ six requests ];
+  build-system = [ setuptools ];
+
+  dependencies = [
+    azure-core
+    typing-extensions
+  ];
 
   pythonNamespaces = [ "azure" ];
 
-  # requires an active Azure Cosmos service
+  # Requires an active Azure Cosmos service
   doCheck = false;
 
+  pythonImportsCheck = [ "azure.cosmos" ];
+
   meta = with lib; {
     description = "Azure Cosmos DB API";
-    homepage = "https://github.com/Azure/azure-sdk-for-python";
+    homepage = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cosmos/azure-cosmos";
+    changelog = "https://github.com/Azure/azure-sdk-for-python/blob/azure-cosmos_${version}/sdk/cosmos/azure-cosmos/CHANGELOG.md";
     license = licenses.mit;
     maintainers = with maintainers; [ jonringer ];
   };