bazel: use openssl for selected target platform

This commit is contained in:
Malte Poll 2023-11-23 17:33:06 +01:00
parent 9be252fccb
commit c5acb18c2b
3 changed files with 2 additions and 24 deletions

View File

@ -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",

View File

@ -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",

View File

@ -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",