Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

51 changes: 19 additions & 32 deletions pkgs/development/python-modules/uamqp/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
stdenv,
buildPythonPackage,
fetchFromGitHub,
fetchpatch,
cython_0,
fetchpatch2,
setuptools,
cython,
certifi,
CFNetwork,
cmake,
Expand All @@ -17,41 +18,23 @@

buildPythonPackage rec {
pname = "uamqp";
version = "1.6.9";
format = "setuptools";
version = "1.6.11";
pyproject = true;

src = fetchFromGitHub {
owner = "Azure";
repo = "azure-uamqp-python";
rev = "refs/tags/v${version}";
hash = "sha256-sDRIM41zey1F6/x1ZioJJBAQCVyf1NKzhS82Ew08pgM=";
hash = "sha256-HTIOHheCrvyI7DwA/UcUXk/fbesd29lvUvJ9TAeG3CE=";
};

patches =
lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.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.hostPlatform.isDarwin && !stdenv.hostPlatform.isx86_64) ''
# force darwin aarch64 to use openssl instead of applessl, removing
Expand All @@ -69,9 +52,13 @@ buildPythonPackage rec {
src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/CMakeLists.txt
'';

build-system = [
cython
setuptools
];

nativeBuildInputs = [
cmake
cython_0
];

buildInputs =
Expand All @@ -82,7 +69,7 @@ buildPythonPackage rec {
Security
];

propagatedBuildInputs = [ certifi ];
dependencies = [ certifi ];

dontUseCmakeConfigure = true;

Expand Down