load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "platforms", sha256 = "5308fc1d8865406a49427ba24a9ab53087f17f5266a7aabbfc28823f3916e1ca", urls = [ "https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.6/platforms-0.0.6.tar.gz", "https://github.com/bazelbuild/platforms/releases/download/0.0.6/platforms-0.0.6.tar.gz", ], ) http_archive( name = "rules_cc", urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.0.4/rules_cc-0.0.4.tar.gz"], sha256 = "af6cc82d87db94585bceeda2561cb8a9d55ad435318ccb4ddfee18a43580fb5d", strip_prefix = "rules_cc-0.0.4", ) # To find additional information on this release or newer ones visit: # https://github.com/bazelbuild/rules_rust/releases http_archive( name = "rules_rust", sha256 = "5c2b6745236f8ce547f82eeacbbcc81d736734cc8bd92e60d3e3cdfa6e167bb5", urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.15.0/rules_rust-v0.15.0.tar.gz"], ) http_archive( name = "rules_proto_grpc", sha256 = "fb7fc7a3c19a92b2f15ed7c4ffb2983e956625c1436f57a3430b897ba9864059", strip_prefix = "rules_proto_grpc-4.3.0", urls = ["https://github.com/rules-proto-grpc/rules_proto_grpc/archive/4.3.0.tar.gz"], ) # # Nix # http_archive( name = "io_tweag_rules_nixpkgs", sha256 = "b01f170580f646ee3cde1ea4c117d00e561afaf3c59eda604cf09194a824ff10", strip_prefix = "rules_nixpkgs-0.9.0", urls = ["https://github.com/tweag/rules_nixpkgs/archive/v0.9.0.tar.gz"], ) load("@io_tweag_rules_nixpkgs//nixpkgs:repositories.bzl", "rules_nixpkgs_dependencies") rules_nixpkgs_dependencies() load("@io_tweag_rules_nixpkgs//nixpkgs:nixpkgs.bzl", "nixpkgs_cc_configure", "nixpkgs_git_repository", "nixpkgs_package") nixpkgs_git_repository( name = "nixpkgs", revision = "22.11", ) nixpkgs_cc_configure( name = "nixpkgs_config_cc", repository = "@nixpkgs", ) load("@rules_cc//cc:repositories.bzl", "rules_cc_dependencies", "rules_cc_toolchains") rules_cc_dependencies() rules_cc_toolchains() load("@io_tweag_rules_nixpkgs//nixpkgs:nixpkgs.bzl", "nixpkgs_package") nixpkgs_package( name = "curlFull", repository = "@nixpkgs", ) nixpkgs_package( name = "curl.dev", build_file_content = """\ load("@rules_cc//cc:defs.bzl", "cc_library") filegroup( name = "include", srcs = glob(["include/**/*.h"]), visibility = ["//visibility:public"], ) cc_library( name = "curl", srcs = ["@curlFull//:lib"], hdrs = [":include"], strip_include_prefix = "include", visibility = ["//visibility:public"], ) """, repository = "@nixpkgs", ) nixpkgs_package( name = "libnghttp2", repository = "@nixpkgs", ) nixpkgs_package( name = "libnghttp2.dev", build_file_content = """\ load("@rules_cc//cc:defs.bzl", "cc_library") filegroup( name = "include", srcs = glob(["include/**/*.h"]), visibility = ["//visibility:public"], ) cc_library( name = "libnghttp2", srcs = ["@libnghttp2//:lib"], hdrs = [":include"], strip_include_prefix = "include", visibility = ["//visibility:public"], ) """, repository = "@nixpkgs", ) load("@rules_rust//rust:repositories.bzl", "rules_rust_dependencies", "rust_register_toolchains") rules_rust_dependencies() rust_register_toolchains( edition = "2021", version = "1.65.0", ) load("@rules_rust//proto:repositories.bzl", "rust_proto_repositories") rust_proto_repositories() load("@rules_rust//proto:transitive_repositories.bzl", "rust_proto_transitive_repositories") rust_proto_transitive_repositories() load("@rules_rust//crate_universe:repositories.bzl", "crate_universe_dependencies") crate_universe_dependencies( bootstrap = True, rust_version = "1.65.0", ) load("@rules_rust//crate_universe:defs.bzl", "crate", "crates_repository", "render_config", "splicing_config") crates_repository( name = "crate_index", annotations = { "rust-embed": [crate.annotation( crate_features = ["debug-embed", "actix"] )] }, cargo_lockfile = "//:Cargo.lock", lockfile = "//:cargo-bazel-lock.json", manifests = [ "//:Cargo.toml", "//addons:Cargo.toml", "//audio:Cargo.toml", "//client:Cargo.toml", "//discovery:Cargo.toml", "//entity:Cargo.toml", "//graphql:Cargo.toml", "//migration:Cargo.toml", "//playback:Cargo.toml", "//scanner:Cargo.toml", "//server:Cargo.toml", "//settings:Cargo.toml", "//storage:Cargo.toml", "//tracklist:Cargo.toml", "//types:Cargo.toml", "//webui/musicplayer/src-tauri:Cargo.toml", "//webui:Cargo.toml", ], splicing_config = splicing_config( resolver_version = "2", ), render_config = render_config( default_package_name = "", ), ) load("@crate_index//:defs.bzl", "crate_repositories") crate_repositories()