GitXplorerGitXplorer
n

rules_os

public
1 stars
0 forks
1 issues

Commits

List of commits on branch main.
Unverified
68cdf228f8449a2b42b3a7b6d65395af74a007d7

os: Changes visibility of libraries to public

nnathaniel-brough committed 4 years ago
Unverified
4b682bd9d2d2335c191cf0f8202bd1375df216c5

os: Moves test dummy into non-user facing target

nnathaniel-brough committed 4 years ago
Unverified
086b84ca18228a93eb73b74c5a85c90d88b8da61

workspace: Adds documentation and third party deps

nnathaniel-brough committed 4 years ago
Unverified
b9a7cb63a80d3c7662b58bcf32347a3dcdf3ff3f

.gitignore: Adds rules for bazel and vscode

nnathaniel-brough committed 4 years ago
Unverified
6b4b7306c70fba4ecb665bb7fe860980d18879e2

os: Adds repository rules for normalising os

nnathaniel-brough committed 4 years ago
Verified
741ab0f1149dddff53a417e744343dbd428255e9

Initial commit

committed 4 years ago

README

The README file for this repository.

rules_os

Provides a set of tools for determining the OS from various Bazel contexts.

Getting started

load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")

git_repository(
    name = "rules_os",
    commit  = "b9a7cb63a80d3c7662b58bcf32347a3dcdf3ff3f",
    remote = "https://github.com/silvergasp/rules_os.git",
)

Usage

Normalising repository os defnintions.

# your_repository_rule.bzl
load("@rules_os//os:repository_os.bzl" ,"normalise_os")

def _your_impl(repository_ctx):
    os = normalise_os(repository_ctx)
    print(os)
    # @platforms//os:linux or @platforms//os:windows or @platforms//os:macos