From 1ce01c1d4f6f2b89f4886248da688b8e50652db5 Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Sun, 13 Oct 2024 04:27:16 +0200 Subject: [PATCH] azure-sdk-for-cpp: init at various versions --- .../az/azure-sdk-for-cpp/attestation.nix | 49 ++++ .../az/azure-sdk-for-cpp/core-amqp.nix | 52 ++++ .../core-tracing-opentelemetry.nix | 49 ++++ pkgs/by-name/az/azure-sdk-for-cpp/core.nix | 51 ++++ .../by-name/az/azure-sdk-for-cpp/identity.nix | 47 ++++ .../keyvault-administration.nix | 45 ++++ .../keyvault-certificates.nix | 45 ++++ .../az/azure-sdk-for-cpp/keyvault-keys.nix | 45 ++++ .../az/azure-sdk-for-cpp/keyvault-secrets.nix | 45 ++++ ...ssaging-eventhubs-checkpointstore-blob.nix | 49 ++++ .../azure-sdk-for-cpp/messaging-eventhubs.nix | 49 ++++ pkgs/by-name/az/azure-sdk-for-cpp/package.nix | 244 ++++++++++++++++++ .../az/azure-sdk-for-cpp/storage-blobs.nix | 45 ++++ .../az/azure-sdk-for-cpp/storage-common.nix | 51 ++++ .../storage-files-datalake.nix | 48 ++++ .../storage-files-shares.nix | 45 ++++ .../az/azure-sdk-for-cpp/storage-queues.nix | 45 ++++ pkgs/by-name/az/azure-sdk-for-cpp/tables.nix | 51 ++++ 18 files changed, 1055 insertions(+) create mode 100644 pkgs/by-name/az/azure-sdk-for-cpp/attestation.nix create mode 100644 pkgs/by-name/az/azure-sdk-for-cpp/core-amqp.nix create mode 100644 pkgs/by-name/az/azure-sdk-for-cpp/core-tracing-opentelemetry.nix create mode 100644 pkgs/by-name/az/azure-sdk-for-cpp/core.nix create mode 100644 pkgs/by-name/az/azure-sdk-for-cpp/identity.nix create mode 100644 pkgs/by-name/az/azure-sdk-for-cpp/keyvault-administration.nix create mode 100644 pkgs/by-name/az/azure-sdk-for-cpp/keyvault-certificates.nix create mode 100644 pkgs/by-name/az/azure-sdk-for-cpp/keyvault-keys.nix create mode 100644 pkgs/by-name/az/azure-sdk-for-cpp/keyvault-secrets.nix create mode 100644 pkgs/by-name/az/azure-sdk-for-cpp/messaging-eventhubs-checkpointstore-blob.nix create mode 100644 pkgs/by-name/az/azure-sdk-for-cpp/messaging-eventhubs.nix create mode 100644 pkgs/by-name/az/azure-sdk-for-cpp/package.nix create mode 100644 pkgs/by-name/az/azure-sdk-for-cpp/storage-blobs.nix create mode 100644 pkgs/by-name/az/azure-sdk-for-cpp/storage-common.nix create mode 100644 pkgs/by-name/az/azure-sdk-for-cpp/storage-files-datalake.nix create mode 100644 pkgs/by-name/az/azure-sdk-for-cpp/storage-files-shares.nix create mode 100644 pkgs/by-name/az/azure-sdk-for-cpp/storage-queues.nix create mode 100644 pkgs/by-name/az/azure-sdk-for-cpp/tables.nix diff --git a/pkgs/by-name/az/azure-sdk-for-cpp/attestation.nix b/pkgs/by-name/az/azure-sdk-for-cpp/attestation.nix new file mode 100644 index 000000000000..63ecbb60751a --- /dev/null +++ b/pkgs/by-name/az/azure-sdk-for-cpp/attestation.nix @@ -0,0 +1,49 @@ +{ + stdenv, + azure-sdk-for-cpp, + cmake, + ninja, + openssl, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "azure-sdk-for-cpp-security-attestation"; + version = "1.2.0-beta.1-unreleased-2025-03-12"; + outputs = [ + "out" + "dev" + ]; + + inherit (azure-sdk-for-cpp) meta src; + sourceRoot = "source/sdk/attestation/azure-security-attestation"; + + postPatch = '' + sed -i '/CMAKE_CXX_STANDARD/d' CMakeLists.txt + substituteInPlace src/private/crypto/openssl/openssl_helpers.hpp \ + --replace-fail "#ifdef __cpp_nontype_template_parameter_auto" "#if 0" + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ninja + ]; + + buildInputs = [ openssl ]; + propagatedBuildInputs = [ azure-sdk-for-cpp.core ]; + + env = { + AZURE_SDK_DISABLE_AUTO_VCPKG = 1; + }; + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DWARNINGS_AS_ERRORS=OFF" + ]; + + postInstall = '' + moveToOutput "share" $dev + ''; + + doCheck = false; +}) 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 new file mode 100644 index 000000000000..18e9711e42ae --- /dev/null +++ b/pkgs/by-name/az/azure-sdk-for-cpp/core-amqp.nix @@ -0,0 +1,52 @@ +{ + stdenv, + azure-sdk-for-cpp, + cmake, + ninja, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "azure-sdk-for-cpp-core-amqp"; + version = "1.0.0-beta.12-unreleased-2025-06-25"; + outputs = [ + "out" + "dev" + ]; + + inherit (azure-sdk-for-cpp) meta src; + sourceRoot = "source/sdk/core/azure-core-amqp"; + + postPatch = '' + sed -i '/CMAKE_CXX_STANDARD/d' CMakeLists.txt + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ninja + ]; + + 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 + ]; + + env = { + AZURE_SDK_DISABLE_AUTO_VCPKG = 1; + NIX_CFLAGS_COMPILE = "-Wno-error"; + }; + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DDISABLE_RUST_IN_BUILD=ON" + "-DWARNINGS_AS_ERRORS=OFF" + ]; + + postInstall = '' + moveToOutput "share" $dev + ''; + + doCheck = false; +}) 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 new file mode 100644 index 000000000000..f9339531359d --- /dev/null +++ b/pkgs/by-name/az/azure-sdk-for-cpp/core-tracing-opentelemetry.nix @@ -0,0 +1,49 @@ +{ + stdenv, + azure-sdk-for-cpp, + cmake, + ninja, + opentelemetry-cpp, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "azure-sdk-for-cpp-core-tracing-opentelemetry"; + version = "1.0.0-beta.5-unreleased-2025-05-21"; + outputs = [ + "out" + "dev" + ]; + + inherit (azure-sdk-for-cpp) src; + sourceRoot = "source/sdk/core/azure-core-tracing-opentelemetry"; + + postPatch = '' + sed -i '/CMAKE_CXX_STANDARD/d' CMakeLists.txt + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ninja + ]; + + buildInputs = [ opentelemetry-cpp ]; + propagatedBuildInputs = [ azure-sdk-for-cpp.core ]; + + env = { + AZURE_SDK_DISABLE_AUTO_VCPKG = 1; + }; + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DWARNINGS_AS_ERRORS=OFF" + ]; + + postInstall = '' + moveToOutput "share" $dev + ''; + + doCheck = false; + + meta = azure-sdk-for-cpp.meta; +}) diff --git a/pkgs/by-name/az/azure-sdk-for-cpp/core.nix b/pkgs/by-name/az/azure-sdk-for-cpp/core.nix new file mode 100644 index 000000000000..3a0503e6de7a --- /dev/null +++ b/pkgs/by-name/az/azure-sdk-for-cpp/core.nix @@ -0,0 +1,51 @@ +{ + stdenv, + azure-sdk-for-cpp, + cmake, + ninja, + curl, + libxml2, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "azure-sdk-for-cpp-core"; + version = "1.16.0"; + outputs = [ + "out" + "dev" + ]; + + inherit (azure-sdk-for-cpp) meta src; + sourceRoot = "source/sdk/core/azure-core"; + + postPatch = '' + sed -i '/CMAKE_CXX_STANDARD/d' CMakeLists.txt + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ninja + ]; + + propagatedBuildInputs = [ + curl + libxml2 + ]; + + env = { + AZURE_SDK_DISABLE_AUTO_VCPKG = 1; + }; + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DBUILD_TRANSPORT_CURL=ON" + "-DWARNINGS_AS_ERRORS=OFF" + ]; + + postInstall = '' + moveToOutput "share" $dev + ''; + + doCheck = false; +}) diff --git a/pkgs/by-name/az/azure-sdk-for-cpp/identity.nix b/pkgs/by-name/az/azure-sdk-for-cpp/identity.nix new file mode 100644 index 000000000000..119f804425e7 --- /dev/null +++ b/pkgs/by-name/az/azure-sdk-for-cpp/identity.nix @@ -0,0 +1,47 @@ +{ + stdenv, + azure-sdk-for-cpp, + cmake, + ninja, + openssl, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "azure-sdk-for-cpp-identity"; + version = "1.12.0"; + outputs = [ + "out" + "dev" + ]; + + inherit (azure-sdk-for-cpp) meta src; + sourceRoot = "source/sdk/identity/azure-identity"; + + postPatch = '' + sed -i '/CMAKE_CXX_STANDARD/d' CMakeLists.txt + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ninja + ]; + + buildInputs = [ openssl ]; + propagatedBuildInputs = [ azure-sdk-for-cpp.core ]; + + env = { + AZURE_SDK_DISABLE_AUTO_VCPKG = 1; + }; + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DWARNINGS_AS_ERRORS=OFF" + ]; + + postInstall = '' + moveToOutput "share" $dev + ''; + + doCheck = false; +}) diff --git a/pkgs/by-name/az/azure-sdk-for-cpp/keyvault-administration.nix b/pkgs/by-name/az/azure-sdk-for-cpp/keyvault-administration.nix new file mode 100644 index 000000000000..7de38e79ac54 --- /dev/null +++ b/pkgs/by-name/az/azure-sdk-for-cpp/keyvault-administration.nix @@ -0,0 +1,45 @@ +{ + stdenv, + azure-sdk-for-cpp, + cmake, + ninja, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "azure-sdk-for-cpp-keyvault-administration"; + version = "4.0.0-beta.6-unreleased-2025-03-12"; + outputs = [ + "out" + "dev" + ]; + + inherit (azure-sdk-for-cpp) meta src; + sourceRoot = "source/sdk/keyvault/azure-security-keyvault-administration"; + + postPatch = '' + sed -i '/CMAKE_CXX_STANDARD/d' CMakeLists.txt + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ninja + ]; + + propagatedBuildInputs = [ azure-sdk-for-cpp.core ]; + + env = { + AZURE_SDK_DISABLE_AUTO_VCPKG = 1; + }; + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DWARNINGS_AS_ERRORS=OFF" + ]; + + postInstall = '' + moveToOutput "share" $dev + ''; + + doCheck = false; +}) diff --git a/pkgs/by-name/az/azure-sdk-for-cpp/keyvault-certificates.nix b/pkgs/by-name/az/azure-sdk-for-cpp/keyvault-certificates.nix new file mode 100644 index 000000000000..85d76b9ab7f1 --- /dev/null +++ b/pkgs/by-name/az/azure-sdk-for-cpp/keyvault-certificates.nix @@ -0,0 +1,45 @@ +{ + stdenv, + azure-sdk-for-cpp, + cmake, + ninja, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "azure-sdk-for-cpp-keyvault-certificates"; + version = "4.3.0-beta.5-unreleased-2025-06-05"; + outputs = [ + "out" + "dev" + ]; + + inherit (azure-sdk-for-cpp) meta src; + sourceRoot = "source/sdk/keyvault/azure-security-keyvault-certificates"; + + postPatch = '' + sed -i '/CMAKE_CXX_STANDARD/d' CMakeLists.txt + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ninja + ]; + + propagatedBuildInputs = [ azure-sdk-for-cpp.core ]; + + env = { + AZURE_SDK_DISABLE_AUTO_VCPKG = 1; + }; + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DWARNINGS_AS_ERRORS=OFF" + ]; + + postInstall = '' + moveToOutput "share" $dev + ''; + + doCheck = false; +}) diff --git a/pkgs/by-name/az/azure-sdk-for-cpp/keyvault-keys.nix b/pkgs/by-name/az/azure-sdk-for-cpp/keyvault-keys.nix new file mode 100644 index 000000000000..6549e6d9acb2 --- /dev/null +++ b/pkgs/by-name/az/azure-sdk-for-cpp/keyvault-keys.nix @@ -0,0 +1,45 @@ +{ + stdenv, + azure-sdk-for-cpp, + cmake, + ninja, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "azure-sdk-for-cpp-keyvault-keys"; + version = "4.5.0-beta.4-unreleased-2025-04-15"; + outputs = [ + "out" + "dev" + ]; + + inherit (azure-sdk-for-cpp) meta src; + sourceRoot = "source/sdk/keyvault/azure-security-keyvault-keys"; + + postPatch = '' + sed -i '/CMAKE_CXX_STANDARD/d' CMakeLists.txt + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ninja + ]; + + propagatedBuildInputs = [ azure-sdk-for-cpp.core ]; + + env = { + AZURE_SDK_DISABLE_AUTO_VCPKG = 1; + }; + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DWARNINGS_AS_ERRORS=OFF" + ]; + + postInstall = '' + moveToOutput "share" $dev + ''; + + doCheck = false; +}) diff --git a/pkgs/by-name/az/azure-sdk-for-cpp/keyvault-secrets.nix b/pkgs/by-name/az/azure-sdk-for-cpp/keyvault-secrets.nix new file mode 100644 index 000000000000..efd65a0d2933 --- /dev/null +++ b/pkgs/by-name/az/azure-sdk-for-cpp/keyvault-secrets.nix @@ -0,0 +1,45 @@ +{ + stdenv, + azure-sdk-for-cpp, + cmake, + ninja, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "azure-sdk-for-cpp-keyvault-secrets"; + version = "4.3.0-beta.5-unreleased-2025-04-15"; + outputs = [ + "out" + "dev" + ]; + + inherit (azure-sdk-for-cpp) meta src; + sourceRoot = "source/sdk/keyvault/azure-security-keyvault-secrets"; + + postPatch = '' + sed -i '/CMAKE_CXX_STANDARD/d' CMakeLists.txt + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ninja + ]; + + propagatedBuildInputs = [ azure-sdk-for-cpp.core ]; + + env = { + AZURE_SDK_DISABLE_AUTO_VCPKG = 1; + }; + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DWARNINGS_AS_ERRORS=OFF" + ]; + + postInstall = '' + moveToOutput "share" $dev + ''; + + doCheck = false; +}) 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 new file mode 100644 index 000000000000..ebf0a481ece5 --- /dev/null +++ b/pkgs/by-name/az/azure-sdk-for-cpp/messaging-eventhubs-checkpointstore-blob.nix @@ -0,0 +1,49 @@ +{ + stdenv, + azure-sdk-for-cpp, + cmake, + ninja, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "azure-sdk-for-cpp-messaging-eventhubs-checkpointstore-blob"; + version = "1.0.0-beta.2-unreleased-2025-03-27"; + outputs = [ + "out" + "dev" + ]; + + inherit (azure-sdk-for-cpp) meta src; + sourceRoot = "source/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob"; + + postPatch = '' + sed -i '/CMAKE_CXX_STANDARD/d' CMakeLists.txt + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ninja + ]; + + propagatedBuildInputs = [ + azure-sdk-for-cpp.core + azure-sdk-for-cpp.messaging-eventhubs + azure-sdk-for-cpp.storage-blobs + ]; + + env = { + AZURE_SDK_DISABLE_AUTO_VCPKG = 1; + }; + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DWARNINGS_AS_ERRORS=OFF" + ]; + + postInstall = '' + moveToOutput "share" $dev + ''; + + doCheck = false; +}) 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 new file mode 100644 index 000000000000..c813b3b37952 --- /dev/null +++ b/pkgs/by-name/az/azure-sdk-for-cpp/messaging-eventhubs.nix @@ -0,0 +1,49 @@ +{ + stdenv, + azure-sdk-for-cpp, + cmake, + ninja, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "azure-sdk-for-cpp-messaging-eventhubs"; + version = "1.0.0-beta.11-unreleased-2025-05-21"; + outputs = [ + "out" + "dev" + ]; + + inherit (azure-sdk-for-cpp) meta src; + sourceRoot = "source/sdk/eventhubs/azure-messaging-eventhubs"; + + postPatch = '' + sed -i '/CMAKE_CXX_STANDARD/d' CMakeLists.txt + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ninja + ]; + + propagatedBuildInputs = [ + azure-sdk-for-cpp.core + azure-sdk-for-cpp.core-amqp + ]; + + env = { + AZURE_SDK_DISABLE_AUTO_VCPKG = 1; + NIX_CFLAGS_COMPILE = "-Wno-error"; + }; + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DWARNINGS_AS_ERRORS=OFF" + ]; + + postInstall = '' + moveToOutput "share" $dev + ''; + + doCheck = false; +}) diff --git a/pkgs/by-name/az/azure-sdk-for-cpp/package.nix b/pkgs/by-name/az/azure-sdk-for-cpp/package.nix new file mode 100644 index 000000000000..117b489100d6 --- /dev/null +++ b/pkgs/by-name/az/azure-sdk-for-cpp/package.nix @@ -0,0 +1,244 @@ +{ + lib, + stdenv, + fetchFromGitHub, + newScope, + cmake, + ninja, + pkg-config, + curl, + 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"; + + src = fetchFromGitHub { + owner = "Azure"; + repo = "macro-utils-c"; + rev = "5926caf4e42e98e730e6d03395788205649a3ada"; + hash = "sha256-K5G+g+Jnzf7qfb/4+rVOpVgSosoEtNV3Joct1y1Xcdw="; + }; + + 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 + ; + attestation = callPackage ./attestation.nix { }; + core = callPackage ./core.nix { }; + core-amqp = callPackage ./core-amqp.nix { }; + core-tracing-opentelemetry = callPackage ./core-tracing-opentelemetry.nix { }; + messaging-eventhubs = callPackage ./messaging-eventhubs.nix { }; + messaging-eventhubs-checkpointstore-blob = + callPackage ./messaging-eventhubs-checkpointstore-blob.nix + { }; + identity = callPackage ./identity.nix { }; + keyvault-administration = callPackage ./keyvault-administration.nix { }; + keyvault-certificates = callPackage ./keyvault-certificates.nix { }; + keyvault-keys = callPackage ./keyvault-keys.nix { }; + keyvault-secrets = callPackage ./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 { }; + tables = callPackage ./tables.nix { }; + } + ); +in +stdenv.mkDerivation (finalAttrs: { + pname = "azure-sdk-for-cpp"; + version = "1.16.0"; + + src = fetchFromGitHub { + owner = "Azure"; + repo = "azure-sdk-for-cpp"; + tag = "azure-core_1.16.0"; + hash = "sha256-qk1gvPw3bKH5jzpd9eXHGngnBxmsE37KAW226t6hQIA="; + }; + + propagatedBuildInputs = [ + scope.attestation + scope.core + scope.core-amqp + # Currently broken, see comment in ./core-tracing-opentelemetry.nix. + scope.core-tracing-opentelemetry + scope.messaging-eventhubs + scope.messaging-eventhubs-checkpointstore-blob + scope.identity + scope.keyvault-administration + scope.keyvault-certificates + scope.keyvault-keys + scope.keyvault-secrets + scope.storage-blobs + scope.storage-common + scope.storage-files-datalake + scope.storage-files-shares + scope.storage-queues + scope.tables + ]; + + dontBuild = true; + installPhase = '' + runHook preInstall + mkdir $out + runHook postInstall + ''; + + passthru = { + inherit + c-shared-utility + macro-utils-c + umock-c + ; + inherit (scope) + attestation + core + core-amqp + core-tracing-opentelemetry + messaging-eventhubs + messaging-eventhubs-checkpointstore-blob + identity + keyvault-administration + keyvault-certificates + keyvault-keys + keyvault-secrets + storage-blobs + storage-common + storage-files-datalake + storage-files-shares + storage-queues + tables + ; + }; + + meta = { + homepage = "https://azure.github.io/azure-sdk-for-cpp"; + description = "Collection of C++ APIs for interacting with Azure services"; + sourceProvenance = [ lib.sourceTypes.fromSource ]; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.tobim ]; + platforms = lib.platforms.unix; + }; +}) 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 new file mode 100644 index 000000000000..95f232317b89 --- /dev/null +++ b/pkgs/by-name/az/azure-sdk-for-cpp/storage-blobs.nix @@ -0,0 +1,45 @@ +{ + stdenv, + azure-sdk-for-cpp, + cmake, + ninja, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "azure-sdk-for-cpp-storage-blobs"; + version = "12.15.0-beta.2-unreleased-2025-06-25"; + outputs = [ + "out" + "dev" + ]; + + inherit (azure-sdk-for-cpp) meta src; + sourceRoot = "source/sdk/storage/azure-storage-blobs"; + + postPatch = '' + sed -i '/CMAKE_CXX_STANDARD/d' CMakeLists.txt + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ninja + ]; + + propagatedBuildInputs = [ azure-sdk-for-cpp.storage-common ]; + + env = { + AZURE_SDK_DISABLE_AUTO_VCPKG = 1; + }; + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DWARNINGS_AS_ERRORS=OFF" + ]; + + postInstall = '' + moveToOutput "share" $dev + ''; + + doCheck = false; +}) 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 new file mode 100644 index 000000000000..502aa3ea780c --- /dev/null +++ b/pkgs/by-name/az/azure-sdk-for-cpp/storage-common.nix @@ -0,0 +1,51 @@ +{ + stdenv, + azure-sdk-for-cpp, + cmake, + ninja, + openssl, + libxml2, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "azure-sdk-for-cpp-storage-common"; + version = "12.11.0-beta.2-unreleased-2025-06-25"; + outputs = [ + "out" + "dev" + ]; + + inherit (azure-sdk-for-cpp) meta src; + sourceRoot = "source/sdk/storage/azure-storage-common"; + + postPatch = '' + sed -i '/CMAKE_CXX_STANDARD/d' CMakeLists.txt + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ninja + ]; + + buildInputs = [ + openssl + libxml2 + ]; + propagatedBuildInputs = [ azure-sdk-for-cpp.core ]; + + env = { + AZURE_SDK_DISABLE_AUTO_VCPKG = 1; + }; + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DWARNINGS_AS_ERRORS=OFF" + ]; + + postInstall = '' + moveToOutput "share" $dev + ''; + + doCheck = false; +}) 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 new file mode 100644 index 000000000000..033c14117dad --- /dev/null +++ b/pkgs/by-name/az/azure-sdk-for-cpp/storage-files-datalake.nix @@ -0,0 +1,48 @@ +{ + stdenv, + azure-sdk-for-cpp, + cmake, + ninja, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "azure-sdk-for-cpp-storage-files-datalake"; + version = "12.13.0-beta.2-unreleased-2025-06-25"; + outputs = [ + "out" + "dev" + ]; + + inherit (azure-sdk-for-cpp) meta src; + sourceRoot = "source/sdk/storage/azure-storage-files-datalake"; + + postPatch = '' + sed -i '/CMAKE_CXX_STANDARD/d' CMakeLists.txt + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ninja + ]; + + propagatedBuildInputs = [ + azure-sdk-for-cpp.storage-blobs + azure-sdk-for-cpp.storage-common + ]; + + env = { + AZURE_SDK_DISABLE_AUTO_VCPKG = 1; + }; + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DWARNINGS_AS_ERRORS=OFF" + ]; + + postInstall = '' + moveToOutput "share" $dev + ''; + + doCheck = false; +}) 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 new file mode 100644 index 000000000000..ff0c0e7bafd5 --- /dev/null +++ b/pkgs/by-name/az/azure-sdk-for-cpp/storage-files-shares.nix @@ -0,0 +1,45 @@ +{ + stdenv, + azure-sdk-for-cpp, + cmake, + ninja, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "azure-sdk-for-cpp-storage-files-shares"; + version = "12.15.0-beta.2-unreleased-2025-06-25"; + outputs = [ + "out" + "dev" + ]; + + inherit (azure-sdk-for-cpp) meta src; + sourceRoot = "source/sdk/storage/azure-storage-files-shares"; + + postPatch = '' + sed -i '/CMAKE_CXX_STANDARD/d' CMakeLists.txt + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ninja + ]; + + propagatedBuildInputs = [ azure-sdk-for-cpp.storage-common ]; + + env = { + AZURE_SDK_DISABLE_AUTO_VCPKG = 1; + }; + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DWARNINGS_AS_ERRORS=OFF" + ]; + + postInstall = '' + moveToOutput "share" $dev + ''; + + doCheck = false; +}) 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 new file mode 100644 index 000000000000..5157a68d8918 --- /dev/null +++ b/pkgs/by-name/az/azure-sdk-for-cpp/storage-queues.nix @@ -0,0 +1,45 @@ +{ + stdenv, + azure-sdk-for-cpp, + cmake, + ninja, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "azure-sdk-for-cpp-storage-queues"; + version = "12.15.0-beta.2-unreleased-2025-06-25"; + outputs = [ + "out" + "dev" + ]; + + inherit (azure-sdk-for-cpp) meta src; + sourceRoot = "source/sdk/storage/azure-storage-queues"; + + postPatch = '' + sed -i '/CMAKE_CXX_STANDARD/d' CMakeLists.txt + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ninja + ]; + + propagatedBuildInputs = [ azure-sdk-for-cpp.storage-common ]; + + env = { + AZURE_SDK_DISABLE_AUTO_VCPKG = 1; + }; + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DWARNINGS_AS_ERRORS=OFF" + ]; + + postInstall = '' + moveToOutput "share" $dev + ''; + + doCheck = false; +}) diff --git a/pkgs/by-name/az/azure-sdk-for-cpp/tables.nix b/pkgs/by-name/az/azure-sdk-for-cpp/tables.nix new file mode 100644 index 000000000000..c80a51346ceb --- /dev/null +++ b/pkgs/by-name/az/azure-sdk-for-cpp/tables.nix @@ -0,0 +1,51 @@ +{ + stdenv, + azure-sdk-for-cpp, + cmake, + ninja, + openssl, + libxml2, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "azure-sdk-for-cpp-tables"; + version = "1.0.0-beta.7-unreleased-2025-04-15"; + outputs = [ + "out" + "dev" + ]; + + inherit (azure-sdk-for-cpp) meta src; + sourceRoot = "source/sdk/tables/azure-data-tables"; + + postPatch = '' + sed -i '/CMAKE_CXX_STANDARD/d' CMakeLists.txt + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ninja + ]; + + buildInputs = [ + openssl + libxml2 + ]; + propagatedBuildInputs = [ azure-sdk-for-cpp.core ]; + + env = { + AZURE_SDK_DISABLE_AUTO_VCPKG = 1; + }; + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DWARNINGS_AS_ERRORS=OFF" + ]; + + postInstall = '' + moveToOutput "share" $dev + ''; + + doCheck = false; +})