diff --git a/pkgs/development/libraries/azure-sdk-for-cpp/c-shared-utility.nix b/pkgs/development/libraries/azure-sdk-for-cpp/c-shared-utility.nix new file mode 100644 index 000000000000..62f2b95eec9e --- /dev/null +++ b/pkgs/development/libraries/azure-sdk-for-cpp/c-shared-utility.nix @@ -0,0 +1,70 @@ +{ + lib, + stdenv, + fetchFromGitHub, + apple-sdk, + macro-utils-c, + umock-c, + 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 = [ + 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; + }; +} diff --git a/pkgs/development/libraries/azure-sdk-for-cpp/core-amqp.nix b/pkgs/development/libraries/azure-sdk-for-cpp/core-amqp.nix new file mode 100644 index 000000000000..c6cfa768a58d --- /dev/null +++ b/pkgs/development/libraries/azure-sdk-for-cpp/core-amqp.nix @@ -0,0 +1,80 @@ +{ + stdenv, + fetchFromGitHub, + 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"; + version = "1.0.0-beta.11"; + outputs = [ + "out" + "dev" + ]; + + src = fetchFromGitHub { + owner = "Azure"; + repo = "azure-sdk-for-cpp"; + tag = "azure-core-amqp_1.0.0-beta.11"; + hash = "sha256-MQsz5Dmv1BwfUaN1VXMC3hPdMHihlgOBaukp5wgTNJc="; + }; + sourceRoot = "source/sdk/core/azure-core-amqp"; + + postPatch = '' + sed -i '/CMAKE_CXX_STANDARD/d' CMakeLists.txt + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ninja + ]; + + propagatedBuildInputs = [ + core + c-shared-utility + macro-utils-c + 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" + moveToOutput "share/$(basename "$sourceRoot")-cpp/copyright" "$out" + ''; + + # See note in ./core.nix. + doCheck = false; + + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "azure-core-amqp_(.*)" + ]; + }; + + 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/development/libraries/azure-sdk-for-cpp/core-tracing-opentelemetry.nix b/pkgs/development/libraries/azure-sdk-for-cpp/core-tracing-opentelemetry.nix new file mode 100644 index 000000000000..6977e8f144cd --- /dev/null +++ b/pkgs/development/libraries/azure-sdk-for-cpp/core-tracing-opentelemetry.nix @@ -0,0 +1,72 @@ +{ + stdenv, + fetchFromGitHub, + cmake, + ninja, + core, + opentelemetry-cpp, + nix-update-script, + meta, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "azure-sdk-for-cpp-core-tracing-opentelemetry"; + version = "1.0.0-beta.4"; + outputs = [ + "out" + "dev" + ]; + + src = fetchFromGitHub { + owner = "Azure"; + repo = "azure-sdk-for-cpp"; + tag = "azure-core-tracing-opentelemetry_1.0.0-beta.4"; + hash = "sha256-3PqHpoi7zlTUYJ4A4APKp2yPg9nVwgGiyOZ+bng4Crk="; + }; + 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 = [ core ]; + + env = { + AZURE_SDK_DISABLE_AUTO_VCPKG = 1; + }; + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DWARNINGS_AS_ERRORS=OFF" + ]; + + postInstall = '' + moveToOutput "share" "$dev" + moveToOutput "share/$(basename "$sourceRoot")-cpp/copyright" "$out" + ''; + + # See note in ./core.nix. + doCheck = false; + + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "azure-core-tracing-opentelemetry_(.*)" + ]; + }; + + 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/development/libraries/azure-sdk-for-cpp/core.nix b/pkgs/development/libraries/azure-sdk-for-cpp/core.nix new file mode 100644 index 000000000000..3d3faf8f2310 --- /dev/null +++ b/pkgs/development/libraries/azure-sdk-for-cpp/core.nix @@ -0,0 +1,77 @@ +{ + stdenv, + fetchFromGitHub, + cmake, + ninja, + curl, + libxml2, + nix-update-script, + meta, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "azure-sdk-for-cpp-core"; + version = "1.16.1"; + outputs = [ + "out" + "dev" + ]; + + src = fetchFromGitHub { + owner = "Azure"; + repo = "azure-sdk-for-cpp"; + tag = "azure-core_1.16.1"; + hash = "sha256-gMINz3bH80l0QYX3iKJlL962WIMujR1wuN+t4t7g7qg="; + }; + 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" + moveToOutput "share/$(basename "$sourceRoot")-cpp/copyright" "$out" + ''; + + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "azure-core_(.*)" + ]; + }; + + # Testing this is moderately involved, see: + # https://github.com/Azure/azure-sdk-for-cpp/blob/main/CONTRIBUTING.md#testing-the-project + # Unless issues arise, it does not seem worth the effort. + doCheck = false; + + meta = ( + meta + // { + description = "Azure SDK Core Library for C++"; + changelog = "https://github.com/Azure/azure-sdk-for-cpp/blob/main/sdk/core/azure-core/CHANGELOG.md"; + } + ); +}) diff --git a/pkgs/development/libraries/azure-sdk-for-cpp/data-tables.nix b/pkgs/development/libraries/azure-sdk-for-cpp/data-tables.nix new file mode 100644 index 000000000000..4a5e468b04c2 --- /dev/null +++ b/pkgs/development/libraries/azure-sdk-for-cpp/data-tables.nix @@ -0,0 +1,76 @@ +{ + stdenv, + fetchFromGitHub, + cmake, + ninja, + core, + openssl, + libxml2, + nix-update-script, + meta, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "azure-sdk-for-cpp-data-tables"; + version = "1.0.0-beta.6"; + outputs = [ + "out" + "dev" + ]; + + src = fetchFromGitHub { + owner = "Azure"; + repo = "azure-sdk-for-cpp"; + tag = "azure-data-tables_1.0.0-beta.6"; + hash = "sha256-gfkjoA16UP6ToIueYPfhQFh+LEhlVtvTk3qRJoHR5OY="; + }; + 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 = [ core ]; + + env = { + AZURE_SDK_DISABLE_AUTO_VCPKG = 1; + }; + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DWARNINGS_AS_ERRORS=OFF" + ]; + + postInstall = '' + moveToOutput "share" "$dev" + moveToOutput "share/$(basename "$sourceRoot")-cpp/copyright" "$out" + ''; + + # See note in ./core.nix. + doCheck = false; + + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "azure-data-tables_(.*)" + ]; + }; + + 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/development/libraries/azure-sdk-for-cpp/default.nix b/pkgs/development/libraries/azure-sdk-for-cpp/default.nix new file mode 100644 index 000000000000..aa56960e3b13 --- /dev/null +++ b/pkgs/development/libraries/azure-sdk-for-cpp/default.nix @@ -0,0 +1,62 @@ +{ + lib, + newScope, + stdenv, + cmake, + ninja, + pkg-config, + curl, + apple-sdk, + openssl, +}: +lib.makeScope newScope ( + self: + let + callPackage = self.callPackage; + in + { + # So you can override inputs for the entire scope easily. + inherit + stdenv + cmake + ninja + pkg-config + curl + openssl + apple-sdk + ; + + 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/development/libraries/azure-sdk-for-cpp/identity.nix b/pkgs/development/libraries/azure-sdk-for-cpp/identity.nix new file mode 100644 index 000000000000..5e32b14dbe7c --- /dev/null +++ b/pkgs/development/libraries/azure-sdk-for-cpp/identity.nix @@ -0,0 +1,72 @@ +{ + stdenv, + fetchFromGitHub, + cmake, + ninja, + openssl, + core, + nix-update-script, + meta, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "azure-sdk-for-cpp-identity"; + version = "1.13.2"; + outputs = [ + "out" + "dev" + ]; + + src = fetchFromGitHub { + owner = "Azure"; + repo = "azure-sdk-for-cpp"; + tag = "azure-identity_1.13.2"; + hash = "sha256-864fU7BkVWXE0vVEYniXQUbrNRvLhhv6aR3wwdnjbQo="; + }; + sourceRoot = "source/sdk/identity/azure-identity"; + + postPatch = '' + sed -i '/CMAKE_CXX_STANDARD/d' CMakeLists.txt + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ninja + ]; + + buildInputs = [ openssl ]; + propagatedBuildInputs = [ core ]; + + env = { + AZURE_SDK_DISABLE_AUTO_VCPKG = 1; + }; + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DWARNINGS_AS_ERRORS=OFF" + ]; + + postInstall = '' + moveToOutput "share" "$dev" + moveToOutput "share/$(basename "$sourceRoot")-cpp/copyright" "$out" + ''; + + # See note in ./core.nix. + doCheck = false; + + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "azure-identity_(.*)" + ]; + }; + + 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/development/libraries/azure-sdk-for-cpp/macro-utils-c.nix b/pkgs/development/libraries/azure-sdk-for-cpp/macro-utils-c.nix new file mode 100644 index 000000000000..aa9deaeb48d7 --- /dev/null +++ b/pkgs/development/libraries/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/development/libraries/azure-sdk-for-cpp/messaging-eventhubs-checkpointstore-blob.nix b/pkgs/development/libraries/azure-sdk-for-cpp/messaging-eventhubs-checkpointstore-blob.nix new file mode 100644 index 000000000000..c13839413b9b --- /dev/null +++ b/pkgs/development/libraries/azure-sdk-for-cpp/messaging-eventhubs-checkpointstore-blob.nix @@ -0,0 +1,76 @@ +{ + stdenv, + fetchFromGitHub, + cmake, + ninja, + core, + messaging-eventhubs, + storage-blobs, + nix-update-script, + meta, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "azure-sdk-for-cpp-messaging-eventhubs-checkpointstore-blob"; + version = "1.0.0-beta.1"; + outputs = [ + "out" + "dev" + ]; + + src = fetchFromGitHub { + owner = "Azure"; + repo = "azure-sdk-for-cpp"; + tag = "azure-messaging-eventhubs-checkpointstore-blob_1.0.0-beta.1"; + hash = "sha256-487IwzlxnKd09ztf9NQESbp/kZzsT18JXKgMwsG5W/Y="; + }; + sourceRoot = "source/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob"; + + postPatch = '' + sed -i '/CMAKE_CXX_STANDARD/d' CMakeLists.txt + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ninja + ]; + + propagatedBuildInputs = [ + core + messaging-eventhubs + storage-blobs + ]; + + env = { + AZURE_SDK_DISABLE_AUTO_VCPKG = 1; + }; + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DWARNINGS_AS_ERRORS=OFF" + ]; + + postInstall = '' + moveToOutput "share" "$dev" + moveToOutput "share/$(basename "$sourceRoot")-cpp/copyright" "$out" + ''; + + # See note in ./core.nix. + doCheck = false; + + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "azure-messaging-eventhubs-checkpointstore-blob_(.*)" + ]; + }; + + 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/development/libraries/azure-sdk-for-cpp/messaging-eventhubs.nix b/pkgs/development/libraries/azure-sdk-for-cpp/messaging-eventhubs.nix new file mode 100644 index 000000000000..53f90ed64848 --- /dev/null +++ b/pkgs/development/libraries/azure-sdk-for-cpp/messaging-eventhubs.nix @@ -0,0 +1,75 @@ +{ + stdenv, + fetchFromGitHub, + cmake, + ninja, + core, + core-amqp, + nix-update-script, + meta, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "azure-sdk-for-cpp-messaging-eventhubs"; + version = "1.0.0-beta.10"; + outputs = [ + "out" + "dev" + ]; + + src = fetchFromGitHub { + owner = "Azure"; + repo = "azure-sdk-for-cpp"; + tag = "azure-messaging-eventhubs_1.0.0-beta.10"; + hash = "sha256-qGYfvRFnesI+oIp3jCRo53v66aR2qrcummSNpc5sCOw="; + }; + sourceRoot = "source/sdk/eventhubs/azure-messaging-eventhubs"; + + postPatch = '' + sed -i '/CMAKE_CXX_STANDARD/d' CMakeLists.txt + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ninja + ]; + + propagatedBuildInputs = [ + core + 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" + moveToOutput "share/$(basename "$sourceRoot")-cpp/copyright" "$out" + ''; + + # See note in ./core.nix. + doCheck = false; + + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "azure-messaging-eventhubs_(.*)" + ]; + }; + + 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/development/libraries/azure-sdk-for-cpp/security-attestation.nix b/pkgs/development/libraries/azure-sdk-for-cpp/security-attestation.nix new file mode 100644 index 000000000000..bc30ed100f4d --- /dev/null +++ b/pkgs/development/libraries/azure-sdk-for-cpp/security-attestation.nix @@ -0,0 +1,74 @@ +{ + stdenv, + fetchFromGitHub, + cmake, + ninja, + core, + openssl, + nix-update-script, + meta, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "azure-sdk-for-cpp-security-attestation"; + version = "1.2.0-beta.1-unreleased-2025-03-12"; + outputs = [ + "out" + "dev" + ]; + + src = fetchFromGitHub { + owner = "Azure"; + repo = "azure-sdk-for-cpp"; + tag = "azure-security-attestation_1.1.0"; + hash = "sha256-RXCMB7MMIe5x5YgMAqAf306E/1vuRXweAlN5uDHumjA="; + }; + 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 = [ core ]; + + env = { + AZURE_SDK_DISABLE_AUTO_VCPKG = 1; + }; + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DWARNINGS_AS_ERRORS=OFF" + ]; + + postInstall = '' + moveToOutput "share" "$dev" + moveToOutput "share/$(basename "$sourceRoot")-cpp/copyright" "$out" + ''; + + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "azure-security-attestation_(.*)" + ]; + }; + + # See note in ./core.nix. + doCheck = false; + + 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/development/libraries/azure-sdk-for-cpp/security-keyvault-administration.nix b/pkgs/development/libraries/azure-sdk-for-cpp/security-keyvault-administration.nix new file mode 100644 index 000000000000..a5aabce2b0e3 --- /dev/null +++ b/pkgs/development/libraries/azure-sdk-for-cpp/security-keyvault-administration.nix @@ -0,0 +1,70 @@ +{ + stdenv, + fetchFromGitHub, + cmake, + ninja, + core, + nix-update-script, + meta, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "azure-sdk-for-cpp-keyvault-administration"; + version = "4.0.0-beta.5"; + outputs = [ + "out" + "dev" + ]; + + src = fetchFromGitHub { + owner = "Azure"; + repo = "azure-sdk-for-cpp"; + tag = "azure-security-keyvault-administration_4.0.0-beta.5"; + hash = "sha256-EaiJ2Q6c1VsL+RRF0MvS8jdcHwrKLeTJ0fBlySFt/+w="; + }; + sourceRoot = "source/sdk/keyvault/azure-security-keyvault-administration"; + + postPatch = '' + sed -i '/CMAKE_CXX_STANDARD/d' CMakeLists.txt + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ninja + ]; + + propagatedBuildInputs = [ core ]; + + env = { + AZURE_SDK_DISABLE_AUTO_VCPKG = 1; + }; + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DWARNINGS_AS_ERRORS=OFF" + ]; + + postInstall = '' + moveToOutput "share" "$dev" + moveToOutput "share/$(basename "$sourceRoot")-cpp/copyright" "$out" + ''; + + # See note in ./core.nix. + doCheck = false; + + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "azure-security-keyvault-administration_(.*)" + ]; + }; + + 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/development/libraries/azure-sdk-for-cpp/security-keyvault-certificates.nix b/pkgs/development/libraries/azure-sdk-for-cpp/security-keyvault-certificates.nix new file mode 100644 index 000000000000..d3282397f0d5 --- /dev/null +++ b/pkgs/development/libraries/azure-sdk-for-cpp/security-keyvault-certificates.nix @@ -0,0 +1,70 @@ +{ + stdenv, + fetchFromGitHub, + cmake, + ninja, + core, + nix-update-script, + meta, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "azure-sdk-for-cpp-security-keyvault-certificates"; + version = "4.3.0-beta.4"; + outputs = [ + "out" + "dev" + ]; + + src = fetchFromGitHub { + owner = "Azure"; + repo = "azure-sdk-for-cpp"; + tag = "azure-security-keyvault-certificates_4.3.0-beta.4"; + hash = "sha256-6LvqeSqSz5oDxXoR/vD7Pbxc2ksQflFhIrN7DzmMoaE="; + }; + sourceRoot = "source/sdk/keyvault/azure-security-keyvault-certificates"; + + postPatch = '' + sed -i '/CMAKE_CXX_STANDARD/d' CMakeLists.txt + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ninja + ]; + + propagatedBuildInputs = [ core ]; + + env = { + AZURE_SDK_DISABLE_AUTO_VCPKG = 1; + }; + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DWARNINGS_AS_ERRORS=OFF" + ]; + + postInstall = '' + moveToOutput "share" "$dev" + moveToOutput "share/$(basename "$sourceRoot")-cpp/copyright" "$out" + ''; + + # See note in ./core.nix. + doCheck = false; + + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "azure-security-keyvault-certificates_(.*)" + ]; + }; + + 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/development/libraries/azure-sdk-for-cpp/security-keyvault-keys.nix b/pkgs/development/libraries/azure-sdk-for-cpp/security-keyvault-keys.nix new file mode 100644 index 000000000000..c11a3b284d33 --- /dev/null +++ b/pkgs/development/libraries/azure-sdk-for-cpp/security-keyvault-keys.nix @@ -0,0 +1,70 @@ +{ + stdenv, + fetchFromGitHub, + cmake, + ninja, + core, + nix-update-script, + meta, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "azure-sdk-for-cpp-keyvault-keys"; + version = "4.5.0-beta.3"; + outputs = [ + "out" + "dev" + ]; + + src = fetchFromGitHub { + owner = "Azure"; + repo = "azure-sdk-for-cpp"; + tag = "azure-security-keyvault-keys_4.5.0-beta.3"; + hash = "sha256-NSstk0cpgWBOhi50eiFSHDYiJjel2a4l8xxgfIPKSsU="; + }; + sourceRoot = "source/sdk/keyvault/azure-security-keyvault-keys"; + + postPatch = '' + sed -i '/CMAKE_CXX_STANDARD/d' CMakeLists.txt + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ninja + ]; + + propagatedBuildInputs = [ core ]; + + env = { + AZURE_SDK_DISABLE_AUTO_VCPKG = 1; + }; + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DWARNINGS_AS_ERRORS=OFF" + ]; + + postInstall = '' + moveToOutput "share" "$dev" + moveToOutput "share/$(basename "$sourceRoot")-cpp/copyright" "$out" + ''; + + # See note in ./core.nix. + doCheck = false; + + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "azure-keyvault-keys_(.*)" + ]; + }; + + 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/development/libraries/azure-sdk-for-cpp/security-keyvault-secrets.nix b/pkgs/development/libraries/azure-sdk-for-cpp/security-keyvault-secrets.nix new file mode 100644 index 000000000000..9e8da96a0490 --- /dev/null +++ b/pkgs/development/libraries/azure-sdk-for-cpp/security-keyvault-secrets.nix @@ -0,0 +1,70 @@ +{ + stdenv, + fetchFromGitHub, + cmake, + ninja, + core, + nix-update-script, + meta, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "azure-sdk-for-cpp-security-keyvault-secrets"; + version = "4.3.0-beta.4"; + outputs = [ + "out" + "dev" + ]; + + src = fetchFromGitHub { + owner = "Azure"; + repo = "azure-sdk-for-cpp"; + tag = "azure-security-keyvault-secrets_4.3.0-beta.4"; + hash = "sha256-NSstk0cpgWBOhi50eiFSHDYiJjel2a4l8xxgfIPKSsU="; + }; + sourceRoot = "source/sdk/keyvault/azure-security-keyvault-secrets"; + + postPatch = '' + sed -i '/CMAKE_CXX_STANDARD/d' CMakeLists.txt + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ninja + ]; + + propagatedBuildInputs = [ core ]; + + env = { + AZURE_SDK_DISABLE_AUTO_VCPKG = 1; + }; + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DWARNINGS_AS_ERRORS=OFF" + ]; + + postInstall = '' + moveToOutput "share" "$dev" + moveToOutput "share/$(basename "$sourceRoot")-cpp/copyright" "$out" + ''; + + # See note in ./core.nix. + doCheck = false; + + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "azure-security-keyvault-secrets_(.*)" + ]; + }; + + 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/development/libraries/azure-sdk-for-cpp/storage-blobs.nix b/pkgs/development/libraries/azure-sdk-for-cpp/storage-blobs.nix new file mode 100644 index 000000000000..9e338ee0f427 --- /dev/null +++ b/pkgs/development/libraries/azure-sdk-for-cpp/storage-blobs.nix @@ -0,0 +1,70 @@ +{ + stdenv, + fetchFromGitHub, + cmake, + ninja, + storage-common, + nix-update-script, + meta, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "azure-sdk-for-cpp-storage-blobs"; + version = "12.15.0"; + outputs = [ + "out" + "dev" + ]; + + src = fetchFromGitHub { + owner = "Azure"; + repo = "azure-sdk-for-cpp"; + tag = "azure-storage-blobs_12.15.0"; + hash = "sha256-u+zaMoX64GcTKE7QIF5WyENTogLBMTCenoI8hPY7m08="; + }; + sourceRoot = "source/sdk/storage/azure-storage-blobs"; + + postPatch = '' + sed -i '/CMAKE_CXX_STANDARD/d' CMakeLists.txt + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ninja + ]; + + propagatedBuildInputs = [ storage-common ]; + + env = { + AZURE_SDK_DISABLE_AUTO_VCPKG = 1; + }; + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DWARNINGS_AS_ERRORS=OFF" + ]; + + postInstall = '' + moveToOutput "share" "$dev" + moveToOutput "share/$(basename "$sourceRoot")-cpp/copyright" "$out" + ''; + + # See note in ./core.nix. + doCheck = false; + + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "azure-storage-blobs_(.*)" + ]; + }; + + 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/development/libraries/azure-sdk-for-cpp/storage-common.nix b/pkgs/development/libraries/azure-sdk-for-cpp/storage-common.nix new file mode 100644 index 000000000000..284e2ad12e65 --- /dev/null +++ b/pkgs/development/libraries/azure-sdk-for-cpp/storage-common.nix @@ -0,0 +1,76 @@ +{ + stdenv, + cmake, + ninja, + core, + openssl, + libxml2, + fetchFromGitHub, + nix-update-script, + meta, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "azure-sdk-for-cpp-storage-common"; + version = "12.11.0"; + outputs = [ + "out" + "dev" + ]; + + src = fetchFromGitHub { + owner = "Azure"; + repo = "azure-sdk-for-cpp"; + tag = "azure-storage-common_12.11.0"; + hash = "sha256-u+zaMoX64GcTKE7QIF5WyENTogLBMTCenoI8hPY7m08="; + }; + 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 = [ core ]; + + env = { + AZURE_SDK_DISABLE_AUTO_VCPKG = 1; + }; + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DWARNINGS_AS_ERRORS=OFF" + ]; + + postInstall = '' + moveToOutput "share" "$dev" + moveToOutput "share/$(basename "$sourceRoot")-cpp/copyright" "$out" + ''; + + # See note in ./core.nix. + doCheck = false; + + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "azure-storage-common_(.*)" + ]; + }; + + 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/development/libraries/azure-sdk-for-cpp/storage-files-datalake.nix b/pkgs/development/libraries/azure-sdk-for-cpp/storage-files-datalake.nix new file mode 100644 index 000000000000..310154dd8b2b --- /dev/null +++ b/pkgs/development/libraries/azure-sdk-for-cpp/storage-files-datalake.nix @@ -0,0 +1,74 @@ +{ + stdenv, + fetchFromGitHub, + cmake, + ninja, + storage-blobs, + storage-common, + nix-update-script, + meta, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "azure-sdk-for-cpp-storage-files-datalake"; + version = "12.13.0"; + outputs = [ + "out" + "dev" + ]; + + src = fetchFromGitHub { + owner = "Azure"; + repo = "azure-sdk-for-cpp"; + tag = "azure-storage-files-datalake_12.13.0"; + hash = "sha256-u+zaMoX64GcTKE7QIF5WyENTogLBMTCenoI8hPY7m08="; + }; + sourceRoot = "source/sdk/storage/azure-storage-files-datalake"; + + postPatch = '' + sed -i '/CMAKE_CXX_STANDARD/d' CMakeLists.txt + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ninja + ]; + + propagatedBuildInputs = [ + storage-blobs + storage-common + ]; + + env = { + AZURE_SDK_DISABLE_AUTO_VCPKG = 1; + }; + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DWARNINGS_AS_ERRORS=OFF" + ]; + + postInstall = '' + moveToOutput "share" "$dev" + moveToOutput "share/$(basename "$sourceRoot")-cpp/copyright" "$out" + ''; + + # See note in ./core.nix. + doCheck = false; + + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "azure-storage-files-datalake_(.*)" + ]; + }; + + 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/development/libraries/azure-sdk-for-cpp/storage-files-shares.nix b/pkgs/development/libraries/azure-sdk-for-cpp/storage-files-shares.nix new file mode 100644 index 000000000000..141392b262e7 --- /dev/null +++ b/pkgs/development/libraries/azure-sdk-for-cpp/storage-files-shares.nix @@ -0,0 +1,70 @@ +{ + stdenv, + fetchFromGitHub, + cmake, + ninja, + storage-common, + nix-update-script, + meta, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "azure-sdk-for-cpp-storage-files-shares"; + version = "12.15.0"; + outputs = [ + "out" + "dev" + ]; + + src = fetchFromGitHub { + owner = "Azure"; + repo = "azure-sdk-for-cpp"; + tag = "azure-storage-files-shares_12.15.0"; + hash = "sha256-u+zaMoX64GcTKE7QIF5WyENTogLBMTCenoI8hPY7m08="; + }; + sourceRoot = "source/sdk/storage/azure-storage-files-shares"; + + postPatch = '' + sed -i '/CMAKE_CXX_STANDARD/d' CMakeLists.txt + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ninja + ]; + + propagatedBuildInputs = [ storage-common ]; + + env = { + AZURE_SDK_DISABLE_AUTO_VCPKG = 1; + }; + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DWARNINGS_AS_ERRORS=OFF" + ]; + + postInstall = '' + moveToOutput "share" "$dev" + moveToOutput "share/$(basename "$sourceRoot")-cpp/copyright" "$out" + ''; + + # See note in ./core.nix. + doCheck = false; + + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "azure-storage-files-shares_(.*)" + ]; + }; + + 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/development/libraries/azure-sdk-for-cpp/storage-queues.nix b/pkgs/development/libraries/azure-sdk-for-cpp/storage-queues.nix new file mode 100644 index 000000000000..481aefb3459f --- /dev/null +++ b/pkgs/development/libraries/azure-sdk-for-cpp/storage-queues.nix @@ -0,0 +1,70 @@ +{ + stdenv, + cmake, + ninja, + storage-common, + fetchFromGitHub, + nix-update-script, + meta, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "azure-sdk-for-cpp-storage-queues"; + version = "12.5.0"; + outputs = [ + "out" + "dev" + ]; + + src = fetchFromGitHub { + owner = "Azure"; + repo = "azure-sdk-for-cpp"; + tag = "azure-storage-queues_12.5.0"; + hash = "sha256-u+zaMoX64GcTKE7QIF5WyENTogLBMTCenoI8hPY7m08="; + }; + sourceRoot = "source/sdk/storage/azure-storage-queues"; + + postPatch = '' + sed -i '/CMAKE_CXX_STANDARD/d' CMakeLists.txt + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ninja + ]; + + propagatedBuildInputs = [ storage-common ]; + + env = { + AZURE_SDK_DISABLE_AUTO_VCPKG = 1; + }; + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DWARNINGS_AS_ERRORS=OFF" + ]; + + postInstall = '' + moveToOutput "share" "$dev" + moveToOutput "share/$(basename "$sourceRoot")-cpp/copyright" "$out" + ''; + + # See note in ./core.nix. + doCheck = false; + + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "azure-storage-queues_(.*)" + ]; + }; + + 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/development/libraries/azure-sdk-for-cpp/umock-c.nix b/pkgs/development/libraries/azure-sdk-for-cpp/umock-c.nix new file mode 100644 index 000000000000..a56250ef4d30 --- /dev/null +++ b/pkgs/development/libraries/azure-sdk-for-cpp/umock-c.nix @@ -0,0 +1,43 @@ +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + ninja, + macro-utils-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="; + }; + + strictDeps = true; + + 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 = "Pure C mocking library"; + sourceProvenance = [ lib.sourceTypes.fromSource ]; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.tobim ]; + platforms = lib.platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d264db5d0a20..538c13d721f1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1513,6 +1513,8 @@ with pkgs; azure-cli-extensions = recurseIntoAttrs azure-cli.extensions; + azure-sdk-for-cpp = recurseIntoAttrs (callPackage ../development/libraries/azure-sdk-for-cpp { }); + # Derivation's result is not used by nixpkgs. Useful for validation for # regressions of bootstrapTools on hydra and on ofborg. Example: # pkgsCross.aarch64-multiplatform.freshBootstrapTools.build