From ea0b456415328280211db7a9bee78df7724f63a4 Mon Sep 17 00:00:00 2001 From: Malte Poll <1780588+malt3@users.noreply.github.com> Date: Thu, 23 Nov 2023 17:33:06 +0100 Subject: [PATCH] bazel: use openssl for selected target platform --- .../ms_tpm_20_ref.need | 2 +- .../ms_tpm_20_ref.patch | 2 +- WORKSPACE.bazel | 22 ------------------- 3 files changed, 2 insertions(+), 24 deletions(-) diff --git a/3rdparty/bazel/com_github_google_go_tpm_tools/ms_tpm_20_ref.need b/3rdparty/bazel/com_github_google_go_tpm_tools/ms_tpm_20_ref.need index 8e33335e3..83b388537 100644 --- a/3rdparty/bazel/com_github_google_go_tpm_tools/ms_tpm_20_ref.need +++ b/3rdparty/bazel/com_github_google_go_tpm_tools/ms_tpm_20_ref.need @@ -229,7 +229,7 @@ cc_library( ], deps = [ ":ms_tpm_20_ref_google_samples", - "@org_openssl//:org_openssl", + "@//nix/cc:org_openssl", ], target_compatible_with = [ "@platforms//os:linux", diff --git a/3rdparty/bazel/com_github_google_go_tpm_tools/ms_tpm_20_ref.patch b/3rdparty/bazel/com_github_google_go_tpm_tools/ms_tpm_20_ref.patch index 9e4bb7fc7..e98141b8a 100644 --- a/3rdparty/bazel/com_github_google_go_tpm_tools/ms_tpm_20_ref.patch +++ b/3rdparty/bazel/com_github_google_go_tpm_tools/ms_tpm_20_ref.patch @@ -229,7 +229,7 @@ + ], + deps = [ + ":ms_tpm_20_ref_google_samples", -+ "@org_openssl//:org_openssl", ++ "@//nix/cc:org_openssl", + ], + target_compatible_with = [ + "@platforms//os:linux", diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel index 94d308a7b..bfc7e7365 100644 --- a/WORKSPACE.bazel +++ b/WORKSPACE.bazel @@ -56,28 +56,6 @@ nixpkgs_flake_package( package = "mkosi", ) -nixpkgs_flake_package( - name = "org_openssl", - build_file_content = """\ -load("@rules_cc//cc:defs.bzl", "cc_library") -filegroup( - name = "include", - srcs = glob(["include/**/*.h"]), - visibility = ["//visibility:public"], -) -cc_library( - name = "org_openssl", - srcs = glob(["lib/**/*.a"]), - hdrs = [":include"], - strip_include_prefix = "include", - visibility = ["//visibility:public"], -) -""", - nix_flake_file = "//:flake.nix", - nix_flake_lock_file = "//:flake.lock", - package = "openssl", -) - nixpkgs_package( name = "diffutils", repository = "@nixpkgs",