Skip to content

Allow for configurable tools using select #66

Description

@TroyKomodo

Some tools are platform specific (not on macos but on linux).

bazel_env(
    name = "bazel_env",
    tools = {
        "cargo": "//tools/cargo",
        "cargo-deny": "//tools/cargo/deny",
        "cargo-insta": "//tools/cargo/insta",
        "buf": "//tools/buf",
        "buildifier": "//tools/buildifier",
        "dprint": "//tools/dprint",
        "protoc": "//tools/protoc",
        "node": "//tools/node",
        "pnpm": "//tools/pnpm",
        "just": "//tools/just",
        "miniserve": "//tools/miniserve",
        "valgrind": "//tools/valgrind",
        "ibazel": "//tools/ibazel",
        "bazel-diff": "//tools/bazel-diff",
        "rust-analyzer": "//tools/rust-analyzer",
        "rust-analyzer-discover": "//tools/rust-analyzer:discover",
        "rust-analyzer-check": "//tools/rust-analyzer:check",
        "shfmt": "//tools/shfmt",
        "diesel": "//tools/diesel",
    } | select({
        "@platforms//os:linux": {
            "ffmpeg": "//tools/ffmpeg",
            "ffprobe": "//tools/ffmpeg:ffprobe",
        },
        "@platforms//os:windows": {
            "ffmpeg": "//tools/ffmpeg",
            "ffprobe": "//tools/ffmpeg:ffprobe",
        },
        "//conditions:default": {},
    }),
)

In my case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions