about summary refs log tree commit diff
path: root/pkgs/development/python-modules/uamqp/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/uamqp/default.nix')
-rw-r--r--pkgs/development/python-modules/uamqp/default.nix55
1 files changed, 21 insertions, 34 deletions
diff --git a/pkgs/development/python-modules/uamqp/default.nix b/pkgs/development/python-modules/uamqp/default.nix
index 0bde984b93e5..122ecccb046b 100644
--- a/pkgs/development/python-modules/uamqp/default.nix
+++ b/pkgs/development/python-modules/uamqp/default.nix
@@ -3,8 +3,9 @@
   stdenv,
   buildPythonPackage,
   fetchFromGitHub,
-  fetchpatch,
-  cython_0,
+  fetchpatch2,
+  setuptools,
+  cython,
   certifi,
   CFNetwork,
   cmake,
@@ -17,43 +18,25 @@
 
 buildPythonPackage rec {
   pname = "uamqp";
-  version = "1.6.8";
-  format = "setuptools";
+  version = "1.6.11";
+  pyproject = true;
 
   src = fetchFromGitHub {
     owner = "Azure";
     repo = "azure-uamqp-python";
     rev = "refs/tags/v${version}";
-    hash = "sha256-L4E7nnsVZ/VrOM0t4KtztU9ALmtGfi1vDzUi0ogtZOc=";
+    hash = "sha256-HTIOHheCrvyI7DwA/UcUXk/fbesd29lvUvJ9TAeG3CE=";
   };
 
-  patches =
-    lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
-      ./darwin-azure-c-shared-utility-corefoundation.patch
-    ]
-    ++ [
-      (fetchpatch {
-        name = "CVE-2024-25110.patch";
-        url = "https://github.com/Azure/azure-uamqp-c/commit/30865c9ccedaa32ddb036e87a8ebb52c3f18f695.patch";
-        stripLen = 1;
-        extraPrefix = "src/vendor/azure-uamqp-c/";
-        hash = "sha256-igzZqTLUUyuNcpCUbYHI4RXmWxg+7EC/yyD4DBurR2M=";
-      })
-      (fetchpatch {
-        name = "CVE-2024-27099.patch";
-        url = "https://github.com/Azure/azure-uamqp-c/commit/2ca42b6e4e098af2d17e487814a91d05f6ae4987.patch";
-        stripLen = 1;
-        extraPrefix = "src/vendor/azure-uamqp-c/";
-        # other files are just tests which aren't run from the python
-        # builder anyway
-        includes = [ "src/vendor/azure-uamqp-c/src/link.c" ];
-        hash = "sha256-EqDfG1xAz5CG8MssSSrz8Yrje5qwF8ri1Kdw+UUu5ms=";
-      })
-      # Fix incompatible function pointer conversion error with clang 16.
-      ./clang-fix-incompatible-function-pointer-conversion.patch
-    ];
+  patches = [
+    (fetchpatch2 {
+      name = "fix-clang16-compatibility.patch";
+      url = "https://github.com/Azure/azure-uamqp-python/commit/bd6d9ef5a8bca3873e1e66218fd09ca787b8064e.patch";
+      hash = "sha256-xtnIVjB71EPJp/QjLQWctcSDds5s6n4ut+gnvp3VMlM=";
+    })
+  ];
 
-  postPatch = lib.optionalString (stdenv.isDarwin && !stdenv.isx86_64) ''
+  postPatch = lib.optionalString (stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isx86_64) ''
     # force darwin aarch64 to use openssl instead of applessl, removing
     # some quirks upstream thinks they need to use openssl on macos
     sed -i \
@@ -69,20 +52,24 @@ buildPythonPackage rec {
       src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/CMakeLists.txt
   '';
 
+  build-system = [
+    cython
+    setuptools
+  ];
+
   nativeBuildInputs = [
     cmake
-    cython_0
   ];
 
   buildInputs =
     [ openssl ]
-    ++ lib.optionals stdenv.isDarwin [
+    ++ lib.optionals stdenv.hostPlatform.isDarwin [
       CoreFoundation
       CFNetwork
       Security
     ];
 
-  propagatedBuildInputs = [ certifi ];
+  dependencies = [ certifi ];
 
   dontUseCmakeConfigure = true;