generated from bazel-contrib/rules-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MODULE.bazel
53 lines (46 loc) · 1.59 KB
/
MODULE.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
bazel_dep(name = "rules_nim", version = "0.0.0", dev_dependency = True)
bazel_dep(name = "bazel_skylib", version = "1.7.1", dev_dependency = True)
bazel_dep(name = "rules_nixpkgs_core", version = "0.12.0", dev_dependency = True)
bazel_dep(name = "aspect_bazel_lib", version = "2.9.4")
local_path_override(
module_name = "rules_nim",
path = "../..",
)
nim = use_extension("@rules_nim//nim:extensions.bzl", "nim")
nim.toolchain(nim_version = "2.2.0")
use_repo(nim, "nim_toolchains")
register_toolchains("@nim_toolchains//:all")
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "measuremancer",
url = "https://github.com/SciNim/Measuremancer/archive/refs/tags/v0.2.8.tar.gz",
integrity = "sha256-9/PDao5uR2IwFKmUL5oDYz/Gt4wRDMwp4aAv24HGtKg=",
strip_prefix = "Measuremancer-0.2.8",
build_file_content =
"""load("@rules_nim//nim:defs.bzl", "nim_module")
nim_module(
name = "measuremancer",
srcs = glob(["**/*.nim"]),
visibility = ["//visibility:public"],
)""",
)
nix_repo = use_extension("@rules_nixpkgs_core//extensions:repository.bzl", "nix_repo")
nix_pkg = use_extension("@rules_nixpkgs_core//extensions:package.bzl", "nix_pkg")
nix_repo.file(
name = "nixpkgs",
file = "//:nixpkgs.nix",
file_deps = ["//:flake.lock"],
)
use_repo(nix_repo, "nixpkgs")
nix_pkg.attr(
name = "openblas",
repo = "@nixpkgs",
attr = "openblas",
build_file_content = """
cc_library(
name = "openblas",
srcs = glob(["lib/*.so*"]),
visibility = ["//visibility:public"],
)""",
)
use_repo(nix_pkg, "openblas")