From 6d3a379c3fd9f6a7033e0da16d7c095d2ba0ff10 Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Sun, 9 Nov 2025 11:38:45 +0100 Subject: [PATCH] azure-sdk-for-cpp: expose scope as passthru.pkgs --- .../az/azure-sdk-for-cpp/c-shared-utility.nix | 69 ++++ .../az/azure-sdk-for-cpp/core-amqp.nix | 16 +- .../core-tracing-opentelemetry.nix | 7 +- .../az/azure-sdk-for-cpp/data-tables.nix | 7 +- .../by-name/az/azure-sdk-for-cpp/identity.nix | 7 +- .../az/azure-sdk-for-cpp/macro-utils-c.nix | 36 +++ ...ssaging-eventhubs-checkpointstore-blob.nix | 13 +- .../azure-sdk-for-cpp/messaging-eventhubs.nix | 10 +- pkgs/by-name/az/azure-sdk-for-cpp/package.nix | 302 +++++------------- .../security-attestation.nix | 7 +- .../security-keyvault-administration.nix | 7 +- .../security-keyvault-certificates.nix | 7 +- .../security-keyvault-keys.nix | 9 +- .../security-keyvault-secrets.nix | 7 +- .../az/azure-sdk-for-cpp/storage-blobs.nix | 7 +- .../az/azure-sdk-for-cpp/storage-common.nix | 7 +- .../storage-files-datalake.nix | 12 +- .../storage-files-shares.nix | 7 +- .../az/azure-sdk-for-cpp/storage-queues.nix | 7 +- pkgs/by-name/az/azure-sdk-for-cpp/umock-c.nix | 43 +++ 20 files changed, 311 insertions(+), 276 deletions(-) create mode 100644 pkgs/by-name/az/azure-sdk-for-cpp/c-shared-utility.nix create mode 100644 pkgs/by-name/az/azure-sdk-for-cpp/macro-utils-c.nix create mode 100644 pkgs/by-name/az/azure-sdk-for-cpp/umock-c.nix diff --git a/pkgs/by-name/az/azure-sdk-for-cpp/c-shared-utility.nix b/pkgs/by-name/az/azure-sdk-for-cpp/c-shared-utility.nix new file mode 100644 index 000000000000..a98df731abb7 --- /dev/null +++ b/pkgs/by-name/az/azure-sdk-for-cpp/c-shared-utility.nix @@ -0,0 +1,69 @@ +{ + lib, + stdenv, + fetchFromGitHub, + apple-sdk, + azure-sdk-for-cpp, + cmake, + ninja, + pkg-config, + curl, + openssl, +}: +stdenv.mkDerivation { + pname = "azure-c-shared-utility"; + # Same version as in VCPKG as of July 2025. + # https://github.com/microsoft/vcpkg/blob/master/ports/azure-c-shared-utility/portfile.cmake + version = "LTS_07_2022_Ref02-unstable-2025-03-31"; + + src = fetchFromGitHub { + owner = "Azure"; + repo = "azure-c-shared-utility"; + rev = "772a4f8bc338140b4a0f404cf9c344283c5c937f"; + hash = "sha256-NSgY7EQhqR01s00mwgLJFMi8salbsCoAG2PMFrONBGk="; + }; + + # Using the cmake target instead of the variable correctly propagates + # transitive dependencies when using static libraries. + postPatch = '' + substituteInPlace CMakeLists.txt \ + --replace-fail "\''${CURL_LIBRARIES}" "CURL::libcurl" + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ninja + pkg-config + ]; + buildInputs = [ + azure-sdk-for-cpp.pkgs.macro-utils-c + azure-sdk-for-cpp.pkgs.umock-c + ] + ++ lib.optional stdenv.hostPlatform.isDarwin apple-sdk; + propagatedBuildInputs = [ curl ] ++ lib.optional (!stdenv.hostPlatform.isDarwin) openssl; + + cmakeFlags = [ + "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" + "-Duse_default_uuid=ON" + "-Duse_installed_dependencies=ON" + ]; + + env = { + NIX_CFLAGS_COMPILE = "-Wno-error"; + }; + + postInstall = '' + mkdir $out/include/azureiot + ''; + + meta = { + homepage = "https://github.com/Azure/azure-c-shared-utility"; + description = "Azure C SDKs common code"; + sourceProvenance = [ lib.sourceTypes.fromSource ]; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.tobim ]; + platforms = lib.platforms.all; + }; +} diff --git a/pkgs/by-name/az/azure-sdk-for-cpp/core-amqp.nix b/pkgs/by-name/az/azure-sdk-for-cpp/core-amqp.nix index a3d63c4cc49c..cd49944c4d70 100644 --- a/pkgs/by-name/az/azure-sdk-for-cpp/core-amqp.nix +++ b/pkgs/by-name/az/azure-sdk-for-cpp/core-amqp.nix @@ -1,10 +1,14 @@ { stdenv, fetchFromGitHub, - azure-sdk-for-cpp, cmake, ninja, + core, + c-shared-utility, + macro-utils-c, + umock-c, nix-update-script, + meta, }: stdenv.mkDerivation (finalAttrs: { pname = "azure-sdk-for-cpp-core-amqp"; @@ -34,10 +38,10 @@ stdenv.mkDerivation (finalAttrs: { ]; propagatedBuildInputs = [ - azure-sdk-for-cpp.core - azure-sdk-for-cpp.c-shared-utility - azure-sdk-for-cpp.macro-utils-c - azure-sdk-for-cpp.umock-c + core + c-shared-utility + macro-utils-c + umock-c ]; env = { @@ -65,7 +69,7 @@ stdenv.mkDerivation (finalAttrs: { }; meta = ( - azure-sdk-for-cpp.meta + meta // { description = "Azure SDK AMQP Library for C++"; changelog = "https://github.com/Azure/azure-sdk-for-cpp/blob/main/sdk/core/azure-core-amqp/CHANGELOG.md"; diff --git a/pkgs/by-name/az/azure-sdk-for-cpp/core-tracing-opentelemetry.nix b/pkgs/by-name/az/azure-sdk-for-cpp/core-tracing-opentelemetry.nix index a20d1fed7e25..2f31acf60dd5 100644 --- a/pkgs/by-name/az/azure-sdk-for-cpp/core-tracing-opentelemetry.nix +++ b/pkgs/by-name/az/azure-sdk-for-cpp/core-tracing-opentelemetry.nix @@ -1,11 +1,12 @@ { stdenv, fetchFromGitHub, - azure-sdk-for-cpp, cmake, ninja, + core, opentelemetry-cpp, nix-update-script, + meta, }: stdenv.mkDerivation (finalAttrs: { pname = "azure-sdk-for-cpp-core-tracing-opentelemetry"; @@ -35,7 +36,7 @@ stdenv.mkDerivation (finalAttrs: { ]; buildInputs = [ opentelemetry-cpp ]; - propagatedBuildInputs = [ azure-sdk-for-cpp.core ]; + propagatedBuildInputs = [ core ]; env = { AZURE_SDK_DISABLE_AUTO_VCPKG = 1; @@ -60,7 +61,7 @@ stdenv.mkDerivation (finalAttrs: { }; meta = ( - azure-sdk-for-cpp.meta + meta // { description = "Azure SDK Core Tracing Library for C++"; changelog = "https://github.com/Azure/azure-sdk-for-cpp/blob/main/sdk/core/azure-core-tracing-opentelemetry/CHANGELOG.md"; diff --git a/pkgs/by-name/az/azure-sdk-for-cpp/data-tables.nix b/pkgs/by-name/az/azure-sdk-for-cpp/data-tables.nix index b409b8537be8..b4dee1203bec 100644 --- a/pkgs/by-name/az/azure-sdk-for-cpp/data-tables.nix +++ b/pkgs/by-name/az/azure-sdk-for-cpp/data-tables.nix @@ -1,12 +1,13 @@ { stdenv, fetchFromGitHub, - azure-sdk-for-cpp, cmake, ninja, + core, openssl, libxml2, nix-update-script, + meta, }: stdenv.mkDerivation (finalAttrs: { pname = "azure-sdk-for-cpp-data-tables"; @@ -39,7 +40,7 @@ stdenv.mkDerivation (finalAttrs: { openssl libxml2 ]; - propagatedBuildInputs = [ azure-sdk-for-cpp.core ]; + propagatedBuildInputs = [ core ]; env = { AZURE_SDK_DISABLE_AUTO_VCPKG = 1; @@ -64,7 +65,7 @@ stdenv.mkDerivation (finalAttrs: { }; meta = ( - azure-sdk-for-cpp.meta + meta // { description = "Azure Tables client library for C++"; changelog = "https://github.com/Azure/azure-sdk-for-cpp/blob/main/sdk/tables/azure-data-tables/CHANGELOG.md"; diff --git a/pkgs/by-name/az/azure-sdk-for-cpp/identity.nix b/pkgs/by-name/az/azure-sdk-for-cpp/identity.nix index dfdf71f8ef5b..e6108073499b 100644 --- a/pkgs/by-name/az/azure-sdk-for-cpp/identity.nix +++ b/pkgs/by-name/az/azure-sdk-for-cpp/identity.nix @@ -1,7 +1,8 @@ { stdenv, fetchFromGitHub, - azure-sdk-for-cpp, + core, + meta, cmake, ninja, openssl, @@ -35,7 +36,7 @@ stdenv.mkDerivation (finalAttrs: { ]; buildInputs = [ openssl ]; - propagatedBuildInputs = [ azure-sdk-for-cpp.core ]; + propagatedBuildInputs = [ core ]; env = { AZURE_SDK_DISABLE_AUTO_VCPKG = 1; @@ -60,7 +61,7 @@ stdenv.mkDerivation (finalAttrs: { }; meta = ( - azure-sdk-for-cpp.meta + meta // { description = "Azure Identity client library for C++"; changelog = "https://github.com/Azure/azure-sdk-for-cpp/blob/main/sdk/identity/azure-identity/CHANGELOG.md"; diff --git a/pkgs/by-name/az/azure-sdk-for-cpp/macro-utils-c.nix b/pkgs/by-name/az/azure-sdk-for-cpp/macro-utils-c.nix new file mode 100644 index 000000000000..aa9deaeb48d7 --- /dev/null +++ b/pkgs/by-name/az/azure-sdk-for-cpp/macro-utils-c.nix @@ -0,0 +1,36 @@ +{ + lib, + stdenv, + fetchFromGitHub, + cmake, +}: +stdenv.mkDerivation { + # Same version as in VCPKG as of February 2025. + # https://github.com/microsoft/vcpkg/blob/master/ports/azure-macro-utils-c/portfile.cmake + pname = "azure-macro-utils-c"; + version = "1.1.0-unstable-2022-01-21"; + + src = fetchFromGitHub { + owner = "Azure"; + repo = "macro-utils-c"; + rev = "5926caf4e42e98e730e6d03395788205649a3ada"; + hash = "sha256-K5G+g+Jnzf7qfb/4+rVOpVgSosoEtNV3Joct1y1Xcdw="; + }; + + strictDeps = true; + + nativeBuildInputs = [ cmake ]; + + cmakeFlags = [ + "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" + ]; + + meta = { + homepage = "https://github.com/Azure/macro-utils-c"; + description = "C header file that contains a multitude of very useful C macros"; + sourceProvenance = [ lib.sourceTypes.fromSource ]; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.tobim ]; + platforms = lib.platforms.all; + }; +} diff --git a/pkgs/by-name/az/azure-sdk-for-cpp/messaging-eventhubs-checkpointstore-blob.nix b/pkgs/by-name/az/azure-sdk-for-cpp/messaging-eventhubs-checkpointstore-blob.nix index 338d8bcfd68b..dbd634e027be 100644 --- a/pkgs/by-name/az/azure-sdk-for-cpp/messaging-eventhubs-checkpointstore-blob.nix +++ b/pkgs/by-name/az/azure-sdk-for-cpp/messaging-eventhubs-checkpointstore-blob.nix @@ -1,10 +1,13 @@ { stdenv, fetchFromGitHub, - azure-sdk-for-cpp, cmake, ninja, + core, + messaging-eventhubs, + storage-blobs, nix-update-script, + meta, }: stdenv.mkDerivation (finalAttrs: { pname = "azure-sdk-for-cpp-messaging-eventhubs-checkpointstore-blob"; @@ -34,9 +37,9 @@ stdenv.mkDerivation (finalAttrs: { ]; propagatedBuildInputs = [ - azure-sdk-for-cpp.core - azure-sdk-for-cpp.messaging-eventhubs - azure-sdk-for-cpp.storage-blobs + core + messaging-eventhubs + storage-blobs ]; env = { @@ -62,7 +65,7 @@ stdenv.mkDerivation (finalAttrs: { }; meta = ( - azure-sdk-for-cpp.meta + meta // { description = "Azure Event Hubs Blob Storage Checkpoint Store for C++"; changelog = "https://github.com/Azure/azure-sdk-for-cpp/blob/main/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/CHANGELOG.md"; diff --git a/pkgs/by-name/az/azure-sdk-for-cpp/messaging-eventhubs.nix b/pkgs/by-name/az/azure-sdk-for-cpp/messaging-eventhubs.nix index a465536028a6..8bc86299931e 100644 --- a/pkgs/by-name/az/azure-sdk-for-cpp/messaging-eventhubs.nix +++ b/pkgs/by-name/az/azure-sdk-for-cpp/messaging-eventhubs.nix @@ -1,10 +1,12 @@ { stdenv, fetchFromGitHub, - azure-sdk-for-cpp, cmake, ninja, + core, + core-amqp, nix-update-script, + meta, }: stdenv.mkDerivation (finalAttrs: { pname = "azure-sdk-for-cpp-messaging-eventhubs"; @@ -34,8 +36,8 @@ stdenv.mkDerivation (finalAttrs: { ]; propagatedBuildInputs = [ - azure-sdk-for-cpp.core - azure-sdk-for-cpp.core-amqp + core + core-amqp ]; env = { @@ -62,7 +64,7 @@ stdenv.mkDerivation (finalAttrs: { }; meta = ( - azure-sdk-for-cpp.meta + meta // { description = "Azure Event Hubs Client Package for C++"; changelog = "https://github.com/Azure/azure-sdk-for-cpp/blob/main/sdk/eventhubs/azure-messaging-eventhubs/CHANGELOG.md"; diff --git a/pkgs/by-name/az/azure-sdk-for-cpp/package.nix b/pkgs/by-name/az/azure-sdk-for-cpp/package.nix index 5073264b04cb..0f70a79297c0 100644 --- a/pkgs/by-name/az/azure-sdk-for-cpp/package.nix +++ b/pkgs/by-name/az/azure-sdk-for-cpp/package.nix @@ -1,9 +1,8 @@ { lib, - stdenv, - runCommand, - fetchFromGitHub, + stdenvNoCC, newScope, + stdenv, cmake, ninja, pkg-config, @@ -11,222 +10,87 @@ apple-sdk, openssl, }: -let - macro-utils-c = stdenv.mkDerivation { - # Same version as in VCPKG as of February 2025. - # https://github.com/microsoft/vcpkg/blob/master/ports/azure-macro-utils-c/portfile.cmake - pname = "azure-macro-utils-c"; - version = "1.1.0-unstable-2022-01-21"; +stdenvNoCC.mkDerivation (finalAttrs: { + name = "azure-sdk-for-cpp"; - src = fetchFromGitHub { - owner = "Azure"; - repo = "macro-utils-c"; - rev = "5926caf4e42e98e730e6d03395788205649a3ada"; - hash = "sha256-K5G+g+Jnzf7qfb/4+rVOpVgSosoEtNV3Joct1y1Xcdw="; - }; + propagatedBuildInputs = [ + finalAttrs.passthru.pkgs.core + finalAttrs.passthru.pkgs.core-amqp + finalAttrs.passthru.pkgs.core-tracing-opentelemetry + finalAttrs.passthru.pkgs.data-tables + finalAttrs.passthru.pkgs.identity + finalAttrs.passthru.pkgs.messaging-eventhubs + finalAttrs.passthru.pkgs.messaging-eventhubs-checkpointstore-blob + finalAttrs.passthru.pkgs.security-attestation + finalAttrs.passthru.pkgs.security-keyvault-administration + finalAttrs.passthru.pkgs.security-keyvault-certificates + finalAttrs.passthru.pkgs.security-keyvault-keys + finalAttrs.passthru.pkgs.security-keyvault-secrets + finalAttrs.passthru.pkgs.storage-blobs + finalAttrs.passthru.pkgs.storage-common + finalAttrs.passthru.pkgs.storage-files-datalake + finalAttrs.passthru.pkgs.storage-files-shares + finalAttrs.passthru.pkgs.storage-queues + ]; - nativeBuildInputs = [ cmake ]; - - cmakeFlags = [ - "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" - ]; - - meta = { - homepage = "https://github.com/Azure/macro-utils-c"; - description = "A C header file that contains a multitude of very useful C macros"; - sourceProvenance = [ lib.sourceTypes.fromSource ]; - license = lib.licenses.mit; - maintainers = [ lib.maintainers.tobim ]; - platforms = lib.platforms.all; - }; - }; - - c-shared-utility = stdenv.mkDerivation { - pname = "azure-c-shared-utility"; - # Same version as in VCPKG as of July 2025. - # https://github.com/microsoft/vcpkg/blob/master/ports/azure-c-shared-utility/portfile.cmake - version = "LTS_07_2022_Ref02-unstable-2025-03-31"; - - src = fetchFromGitHub { - owner = "Azure"; - repo = "azure-c-shared-utility"; - rev = "772a4f8bc338140b4a0f404cf9c344283c5c937f"; - hash = "sha256-NSgY7EQhqR01s00mwgLJFMi8salbsCoAG2PMFrONBGk="; - }; - - # Using the cmake target instead of the variable correctly propagates - # transitive dependencies when using static libraries. - postPatch = '' - substituteInPlace CMakeLists.txt \ - --replace-fail "\''${CURL_LIBRARIES}" "CURL::libcurl" - ''; - - nativeBuildInputs = [ - cmake - ninja - pkg-config - ]; - buildInputs = [ - macro-utils-c - umock-c - ] - ++ lib.optional stdenv.hostPlatform.isDarwin apple-sdk; - propagatedBuildInputs = [ curl ] ++ lib.optional (!stdenv.hostPlatform.isDarwin) openssl; - - cmakeFlags = [ - "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" - "-Duse_default_uuid=ON" - "-Duse_installed_dependencies=ON" - ]; - - env = { - NIX_CFLAGS_COMPILE = "-Wno-error"; - }; - - postInstall = '' - mkdir $out/include/azureiot - ''; - - meta = { - homepage = "https://github.com/Azure/azure-c-shared-utility"; - description = "Azure C SDKs common code"; - sourceProvenance = [ lib.sourceTypes.fromSource ]; - license = lib.licenses.mit; - maintainers = [ lib.maintainers.tobim ]; - platforms = lib.platforms.all; - }; - }; - - umock-c = stdenv.mkDerivation { - pname = "azure-umock-c"; - # Same version as in VCPKG as of February 2025. - # https://github.com/microsoft/vcpkg/blob/master/ports/umock-c/portfile.cmake - version = "1.1.0-unstable-2022-01-21"; - - src = fetchFromGitHub { - owner = "Azure"; - repo = "umock-c"; - rev = "504193e65d1c2f6eb50c15357167600a296df7ff"; - hash = "sha256-oeqsy63G98c4HWT6NtsYzC6/YxgdROvUe9RAdmElbCM="; - }; - - nativeBuildInputs = [ - cmake - ninja - ]; - buildInputs = [ macro-utils-c ]; - - cmakeFlags = [ - "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" - "-Duse_installed_dependencies=ON" - ]; - - meta = { - homepage = "https://github.com/Azure/umock-c"; - description = " A pure C mocking library"; - sourceProvenance = [ lib.sourceTypes.fromSource ]; - license = lib.licenses.mit; - maintainers = [ lib.maintainers.tobim ]; - platforms = lib.platforms.all; - }; - }; - - scope = lib.makeScope newScope ( - self: - let - callPackage = self.callPackage; - in - { - inherit - stdenv - cmake - ninja - pkg-config - curl - apple-sdk - openssl - ; - core = callPackage ./core.nix { }; - core-amqp = callPackage ./core-amqp.nix { }; - core-tracing-opentelemetry = callPackage ./core-tracing-opentelemetry.nix { }; - data-tables = callPackage ./data-tables.nix { }; - identity = callPackage ./identity.nix { }; - messaging-eventhubs = callPackage ./messaging-eventhubs.nix { }; - messaging-eventhubs-checkpointstore-blob = - callPackage ./messaging-eventhubs-checkpointstore-blob.nix - { }; - security-attestation = callPackage ./security-attestation.nix { }; - security-keyvault-administration = callPackage ./security-keyvault-administration.nix { }; - security-keyvault-certificates = callPackage ./security-keyvault-certificates.nix { }; - security-keyvault-keys = callPackage ./security-keyvault-keys.nix { }; - security-keyvault-secrets = callPackage ./security-keyvault-secrets.nix { }; - storage-blobs = callPackage ./storage-blobs.nix { }; - storage-common = callPackage ./storage-common.nix { }; - storage-files-datalake = callPackage ./storage-files-datalake.nix { }; - storage-files-shares = callPackage ./storage-files-shares.nix { }; - storage-queues = callPackage ./storage-queues.nix { }; - } - ); -in -runCommand "azure-sdk-for-cpp" - { - propagatedBuildInputs = [ - scope.core - scope.core-amqp - scope.core-tracing-opentelemetry - scope.data-tables - scope.identity - scope.messaging-eventhubs - scope.messaging-eventhubs-checkpointstore-blob - scope.security-attestation - scope.security-keyvault-administration - scope.security-keyvault-certificates - scope.security-keyvault-keys - scope.security-keyvault-secrets - scope.storage-blobs - scope.storage-common - scope.storage-files-datalake - scope.storage-files-shares - scope.storage-queues - ]; - - passthru = { - inherit - c-shared-utility - macro-utils-c - umock-c - ; - inherit (scope) - core - core-amqp - core-tracing-opentelemetry - data-tables - identity - messaging-eventhubs - messaging-eventhubs-checkpointstore-blob - security-attestation - security-keyvault-administration - security-keyvault-certificates - security-keyvault-keys - security-keyvault-secrets - storage-blobs - storage-common - storage-files-datalake - storage-files-shares - storage-queues - ; - }; - - meta = { - homepage = "https://azure.github.io/azure-sdk-for-cpp"; - description = "Azure SDK for C++"; - sourceProvenance = [ lib.sourceTypes.fromSource ]; - license = lib.licenses.mit; - maintainers = [ lib.maintainers.tobim ]; - platforms = lib.platforms.all; - }; - } - - '' + buildCommand = '' mkdir $out - '' + ''; + + passthru = { + pkgs = lib.makeScope newScope ( + self: + let + callPackage = self.callPackage; + in + { + # Ugly, but makeScope does not provide a `callPackageWith` variant. + inherit (finalAttrs) meta; + + # So you can override inputs for the entire scope easily. + inherit + stdenv + cmake + ninja + pkg-config + curl + apple-sdk + openssl + ; + + c-shared-utility = callPackage ./c-shared-utility.nix { }; + macro-utils-c = callPackage ./macro-utils-c.nix { }; + umock-c = callPackage ./umock-c.nix { }; + + core = callPackage ./core.nix { }; + core-amqp = callPackage ./core-amqp.nix { }; + core-tracing-opentelemetry = callPackage ./core-tracing-opentelemetry.nix { }; + data-tables = callPackage ./data-tables.nix { }; + identity = callPackage ./identity.nix { }; + messaging-eventhubs = callPackage ./messaging-eventhubs.nix { }; + messaging-eventhubs-checkpointstore-blob = + callPackage ./messaging-eventhubs-checkpointstore-blob.nix + { }; + security-attestation = callPackage ./security-attestation.nix { }; + security-keyvault-administration = callPackage ./security-keyvault-administration.nix { }; + security-keyvault-certificates = callPackage ./security-keyvault-certificates.nix { }; + security-keyvault-keys = callPackage ./security-keyvault-keys.nix { }; + security-keyvault-secrets = callPackage ./security-keyvault-secrets.nix { }; + storage-blobs = callPackage ./storage-blobs.nix { }; + storage-common = callPackage ./storage-common.nix { }; + storage-files-datalake = callPackage ./storage-files-datalake.nix { }; + storage-files-shares = callPackage ./storage-files-shares.nix { }; + storage-queues = callPackage ./storage-queues.nix { }; + } + ); + }; + + meta = { + homepage = "https://azure.github.io/azure-sdk-for-cpp"; + description = "Azure SDK for C++"; + sourceProvenance = [ lib.sourceTypes.fromSource ]; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.tobim ]; + platforms = lib.platforms.all; + }; +}) diff --git a/pkgs/by-name/az/azure-sdk-for-cpp/security-attestation.nix b/pkgs/by-name/az/azure-sdk-for-cpp/security-attestation.nix index 4d42d621cc28..8ac9523789c1 100644 --- a/pkgs/by-name/az/azure-sdk-for-cpp/security-attestation.nix +++ b/pkgs/by-name/az/azure-sdk-for-cpp/security-attestation.nix @@ -1,11 +1,12 @@ { stdenv, fetchFromGitHub, - azure-sdk-for-cpp, cmake, ninja, + core, openssl, nix-update-script, + meta, }: stdenv.mkDerivation (finalAttrs: { pname = "azure-sdk-for-cpp-security-attestation"; @@ -37,7 +38,7 @@ stdenv.mkDerivation (finalAttrs: { ]; buildInputs = [ openssl ]; - propagatedBuildInputs = [ azure-sdk-for-cpp.core ]; + propagatedBuildInputs = [ core ]; env = { AZURE_SDK_DISABLE_AUTO_VCPKG = 1; @@ -62,7 +63,7 @@ stdenv.mkDerivation (finalAttrs: { doCheck = false; meta = ( - azure-sdk-for-cpp.meta + meta // { description = "Azure Attestation Package client library for C++"; changelog = "https://github.com/Azure/azure-sdk-for-cpp/blob/main/sdk/attestation/azure-security-attestation/CHANGELOG.md"; diff --git a/pkgs/by-name/az/azure-sdk-for-cpp/security-keyvault-administration.nix b/pkgs/by-name/az/azure-sdk-for-cpp/security-keyvault-administration.nix index e6b7e2730300..12b0776d8bdb 100644 --- a/pkgs/by-name/az/azure-sdk-for-cpp/security-keyvault-administration.nix +++ b/pkgs/by-name/az/azure-sdk-for-cpp/security-keyvault-administration.nix @@ -1,10 +1,11 @@ { stdenv, fetchFromGitHub, - azure-sdk-for-cpp, cmake, ninja, + core, nix-update-script, + meta, }: stdenv.mkDerivation (finalAttrs: { pname = "azure-sdk-for-cpp-keyvault-administration"; @@ -33,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: { ninja ]; - propagatedBuildInputs = [ azure-sdk-for-cpp.core ]; + propagatedBuildInputs = [ core ]; env = { AZURE_SDK_DISABLE_AUTO_VCPKG = 1; @@ -58,7 +59,7 @@ stdenv.mkDerivation (finalAttrs: { }; meta = ( - azure-sdk-for-cpp.meta + meta // { description = "Azure Security KeyVault Administration client library for C++"; changelog = "https://github.com/Azure/azure-sdk-for-cpp/blob/main/sdk/keyvault/azure-security-keyvault-administration/CHANGELOG.md"; diff --git a/pkgs/by-name/az/azure-sdk-for-cpp/security-keyvault-certificates.nix b/pkgs/by-name/az/azure-sdk-for-cpp/security-keyvault-certificates.nix index 0baba8d337c3..3f4b5c460b3c 100644 --- a/pkgs/by-name/az/azure-sdk-for-cpp/security-keyvault-certificates.nix +++ b/pkgs/by-name/az/azure-sdk-for-cpp/security-keyvault-certificates.nix @@ -1,10 +1,11 @@ { stdenv, fetchFromGitHub, - azure-sdk-for-cpp, cmake, ninja, + core, nix-update-script, + meta, }: stdenv.mkDerivation (finalAttrs: { pname = "azure-sdk-for-cpp-security-keyvault-certificates"; @@ -33,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: { ninja ]; - propagatedBuildInputs = [ azure-sdk-for-cpp.core ]; + propagatedBuildInputs = [ core ]; env = { AZURE_SDK_DISABLE_AUTO_VCPKG = 1; @@ -58,7 +59,7 @@ stdenv.mkDerivation (finalAttrs: { }; meta = ( - azure-sdk-for-cpp.meta + meta // { description = "Azure Key Vault Certificates client library for C++"; changelog = "https://github.com/Azure/azure-sdk-for-cpp/blob/main/sdk/keyvault/azure-security-keyvault-certificates/CHANGELOG.md"; diff --git a/pkgs/by-name/az/azure-sdk-for-cpp/security-keyvault-keys.nix b/pkgs/by-name/az/azure-sdk-for-cpp/security-keyvault-keys.nix index cab2f946e82b..0f160c16b790 100644 --- a/pkgs/by-name/az/azure-sdk-for-cpp/security-keyvault-keys.nix +++ b/pkgs/by-name/az/azure-sdk-for-cpp/security-keyvault-keys.nix @@ -1,10 +1,11 @@ { stdenv, - azure-sdk-for-cpp, + fetchFromGitHub, cmake, ninja, - fetchFromGitHub, + core, nix-update-script, + meta, }: stdenv.mkDerivation (finalAttrs: { pname = "azure-sdk-for-cpp-keyvault-keys"; @@ -33,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: { ninja ]; - propagatedBuildInputs = [ azure-sdk-for-cpp.core ]; + propagatedBuildInputs = [ core ]; env = { AZURE_SDK_DISABLE_AUTO_VCPKG = 1; @@ -58,7 +59,7 @@ stdenv.mkDerivation (finalAttrs: { }; meta = ( - azure-sdk-for-cpp.meta + meta // { description = "Azure Key Vault Key client library for C++"; changelog = "https://github.com/Azure/azure-sdk-for-cpp/blob/main/sdk/keyvault/azure-security-keyvault-keys/CHANGELOG.md"; diff --git a/pkgs/by-name/az/azure-sdk-for-cpp/security-keyvault-secrets.nix b/pkgs/by-name/az/azure-sdk-for-cpp/security-keyvault-secrets.nix index 939bf84bd923..68bc7ce42dec 100644 --- a/pkgs/by-name/az/azure-sdk-for-cpp/security-keyvault-secrets.nix +++ b/pkgs/by-name/az/azure-sdk-for-cpp/security-keyvault-secrets.nix @@ -1,10 +1,11 @@ { stdenv, fetchFromGitHub, - azure-sdk-for-cpp, cmake, ninja, + core, nix-update-script, + meta, }: stdenv.mkDerivation (finalAttrs: { pname = "azure-sdk-for-cpp-security-keyvault-secrets"; @@ -33,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: { ninja ]; - propagatedBuildInputs = [ azure-sdk-for-cpp.core ]; + propagatedBuildInputs = [ core ]; env = { AZURE_SDK_DISABLE_AUTO_VCPKG = 1; @@ -58,7 +59,7 @@ stdenv.mkDerivation (finalAttrs: { }; meta = ( - azure-sdk-for-cpp.meta + meta // { description = "Azure Security Keyvault Secrets Package client library for C++"; changelog = "https://github.com/Azure/azure-sdk-for-cpp/blob/main/sdk/keyvault/azure-security-keyvault-secrets/CHANGELOG.md"; diff --git a/pkgs/by-name/az/azure-sdk-for-cpp/storage-blobs.nix b/pkgs/by-name/az/azure-sdk-for-cpp/storage-blobs.nix index ec7a43d691fb..03569d61b803 100644 --- a/pkgs/by-name/az/azure-sdk-for-cpp/storage-blobs.nix +++ b/pkgs/by-name/az/azure-sdk-for-cpp/storage-blobs.nix @@ -1,10 +1,11 @@ { stdenv, fetchFromGitHub, - azure-sdk-for-cpp, cmake, ninja, + storage-common, nix-update-script, + meta, }: stdenv.mkDerivation (finalAttrs: { pname = "azure-sdk-for-cpp-storage-blobs"; @@ -33,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: { ninja ]; - propagatedBuildInputs = [ azure-sdk-for-cpp.storage-common ]; + propagatedBuildInputs = [ storage-common ]; env = { AZURE_SDK_DISABLE_AUTO_VCPKG = 1; @@ -58,7 +59,7 @@ stdenv.mkDerivation (finalAttrs: { }; meta = ( - azure-sdk-for-cpp.meta + meta // { description = "Azure Storage Blobs Client Library for C++"; changelog = "https://github.com/Azure/azure-sdk-for-cpp/blob/main/sdk/storage/azure-storage-blobs/CHANGELOG.md"; diff --git a/pkgs/by-name/az/azure-sdk-for-cpp/storage-common.nix b/pkgs/by-name/az/azure-sdk-for-cpp/storage-common.nix index cb30fda1b5eb..c85aef042c0e 100644 --- a/pkgs/by-name/az/azure-sdk-for-cpp/storage-common.nix +++ b/pkgs/by-name/az/azure-sdk-for-cpp/storage-common.nix @@ -1,12 +1,13 @@ { stdenv, - azure-sdk-for-cpp, cmake, ninja, + core, openssl, libxml2, fetchFromGitHub, nix-update-script, + meta, }: stdenv.mkDerivation (finalAttrs: { pname = "azure-sdk-for-cpp-storage-common"; @@ -39,7 +40,7 @@ stdenv.mkDerivation (finalAttrs: { openssl libxml2 ]; - propagatedBuildInputs = [ azure-sdk-for-cpp.core ]; + propagatedBuildInputs = [ core ]; env = { AZURE_SDK_DISABLE_AUTO_VCPKG = 1; @@ -64,7 +65,7 @@ stdenv.mkDerivation (finalAttrs: { }; meta = ( - azure-sdk-for-cpp.meta + meta // { description = "Azure Storage Common Client Library for C++"; changelog = "https://github.com/Azure/azure-sdk-for-cpp/blob/main/sdk/storage/azure-storage-common/CHANGELOG.md"; diff --git a/pkgs/by-name/az/azure-sdk-for-cpp/storage-files-datalake.nix b/pkgs/by-name/az/azure-sdk-for-cpp/storage-files-datalake.nix index b4d491b630ec..6972c93a123f 100644 --- a/pkgs/by-name/az/azure-sdk-for-cpp/storage-files-datalake.nix +++ b/pkgs/by-name/az/azure-sdk-for-cpp/storage-files-datalake.nix @@ -1,10 +1,12 @@ { stdenv, - azure-sdk-for-cpp, + fetchFromGitHub, cmake, ninja, - fetchFromGitHub, + storage-blobs, + storage-common, nix-update-script, + meta, }: stdenv.mkDerivation (finalAttrs: { pname = "azure-sdk-for-cpp-storage-files-datalake"; @@ -34,8 +36,8 @@ stdenv.mkDerivation (finalAttrs: { ]; propagatedBuildInputs = [ - azure-sdk-for-cpp.storage-blobs - azure-sdk-for-cpp.storage-common + storage-blobs + storage-common ]; env = { @@ -61,7 +63,7 @@ stdenv.mkDerivation (finalAttrs: { }; meta = ( - azure-sdk-for-cpp.meta + meta // { description = "Azure Storage Files Data Lake Client Library for C++"; changelog = "https://github.com/Azure/azure-sdk-for-cpp/blob/main/sdk/storage/azure-storage-files-datalake/CHANGELOG.md"; diff --git a/pkgs/by-name/az/azure-sdk-for-cpp/storage-files-shares.nix b/pkgs/by-name/az/azure-sdk-for-cpp/storage-files-shares.nix index 9194cd45738b..c7a64f3c5865 100644 --- a/pkgs/by-name/az/azure-sdk-for-cpp/storage-files-shares.nix +++ b/pkgs/by-name/az/azure-sdk-for-cpp/storage-files-shares.nix @@ -1,10 +1,11 @@ { stdenv, fetchFromGitHub, - azure-sdk-for-cpp, cmake, ninja, + storage-common, nix-update-script, + meta, }: stdenv.mkDerivation (finalAttrs: { pname = "azure-sdk-for-cpp-storage-files-shares"; @@ -33,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: { ninja ]; - propagatedBuildInputs = [ azure-sdk-for-cpp.storage-common ]; + propagatedBuildInputs = [ storage-common ]; env = { AZURE_SDK_DISABLE_AUTO_VCPKG = 1; @@ -58,7 +59,7 @@ stdenv.mkDerivation (finalAttrs: { }; meta = ( - azure-sdk-for-cpp.meta + meta // { description = "Azure Storage Files Shares Client Library for C++"; changelog = "https://github.com/Azure/azure-sdk-for-cpp/blob/main/sdk/storage/azure-storage-files-shares/CHANGELOG.md"; diff --git a/pkgs/by-name/az/azure-sdk-for-cpp/storage-queues.nix b/pkgs/by-name/az/azure-sdk-for-cpp/storage-queues.nix index 52ecbbffcfc8..f34d9144b1c3 100644 --- a/pkgs/by-name/az/azure-sdk-for-cpp/storage-queues.nix +++ b/pkgs/by-name/az/azure-sdk-for-cpp/storage-queues.nix @@ -1,10 +1,11 @@ { stdenv, - azure-sdk-for-cpp, cmake, ninja, + storage-common, fetchFromGitHub, nix-update-script, + meta, }: stdenv.mkDerivation (finalAttrs: { pname = "azure-sdk-for-cpp-storage-queues"; @@ -33,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: { ninja ]; - propagatedBuildInputs = [ azure-sdk-for-cpp.storage-common ]; + propagatedBuildInputs = [ storage-common ]; env = { AZURE_SDK_DISABLE_AUTO_VCPKG = 1; @@ -58,7 +59,7 @@ stdenv.mkDerivation (finalAttrs: { }; meta = ( - azure-sdk-for-cpp.meta + meta // { description = "Azure Storage Queues Client Library for C++"; changelog = "https://github.com/Azure/azure-sdk-for-cpp/blob/main/sdk/storage/azure-storage-queues/CHANGELOG.md"; diff --git a/pkgs/by-name/az/azure-sdk-for-cpp/umock-c.nix b/pkgs/by-name/az/azure-sdk-for-cpp/umock-c.nix new file mode 100644 index 000000000000..1008e493a020 --- /dev/null +++ b/pkgs/by-name/az/azure-sdk-for-cpp/umock-c.nix @@ -0,0 +1,43 @@ +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + ninja, + azure-sdk-for-cpp, +}: +stdenv.mkDerivation { + pname = "azure-umock-c"; + # Same version as in VCPKG as of February 2025. + # https://github.com/microsoft/vcpkg/blob/master/ports/umock-c/portfile.cmake + version = "1.1.0-unstable-2022-01-21"; + + src = fetchFromGitHub { + owner = "Azure"; + repo = "umock-c"; + rev = "504193e65d1c2f6eb50c15357167600a296df7ff"; + hash = "sha256-oeqsy63G98c4HWT6NtsYzC6/YxgdROvUe9RAdmElbCM="; + }; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ninja + ]; + buildInputs = [ azure-sdk-for-cpp.pkgs.macro-utils-c ]; + + cmakeFlags = [ + "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" + "-Duse_installed_dependencies=ON" + ]; + + meta = { + homepage = "https://github.com/Azure/umock-c"; + description = "Pure C mocking library"; + sourceProvenance = [ lib.sourceTypes.fromSource ]; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.tobim ]; + platforms = lib.platforms.all; + }; +}