bazel-toolchain VS nixpkgs

Compare bazel-toolchain vs nixpkgs and see what are their differences.

bazel-toolchain

LLVM toolchain for bazel (by grailbio)

nixpkgs

Nix Packages collection (by NixOS)
Our great sponsors
  • SonarLint - Clean code begins in your IDE with SonarLint
  • InfluxDB - Build time-series-based applications quickly and at scale.
  • SaaSHub - Software Alternatives and Reviews
bazel-toolchain nixpkgs
4 776
185 11,328
4.9% 2.4%
6.7 10.0
11 days ago 5 days ago
Starlark Nix
Apache License 2.0 MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

bazel-toolchain

Posts with mentions or reviews of bazel-toolchain. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-12-01.
  • cc toolchain for macOS Monterey / Apple M1
    2 projects | reddit.com/r/bazel | 1 Dec 2022
    load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") BAZEL_TOOLCHAIN_TAG = "0.7.2" BAZEL_TOOLCHAIN_SHA = "f7aa8e59c9d3cafde6edb372d9bd25fb4ee7293ab20b916d867cd0baaa642529" http_archive( name = "com_grail_bazel_toolchain", sha256 = BAZEL_TOOLCHAIN_SHA, strip_prefix = "bazel-toolchain-{tag}".format(tag = BAZEL_TOOLCHAIN_TAG), canonical_id = BAZEL_TOOLCHAIN_TAG, url = "https://github.com/grailbio/bazel-toolchain/archive/{tag}.tar.gz".format(tag = BAZEL_TOOLCHAIN_TAG), ) load("@com_grail_bazel_toolchain//toolchain:deps.bzl", "bazel_toolchain_dependencies") bazel_toolchain_dependencies() load("@com_grail_bazel_toolchain//toolchain:rules.bzl", "llvm_toolchain") llvm_toolchain( name = "llvm_toolchain", llvm_version = "15.0.5", ) load("@llvm_toolchain//:toolchains.bzl", "llvm_register_toolchains") llvm_register_toolchains() http_archive( name = "com_google_googletest", urls = ["https://github.com/google/googletest/archive/609281088cfefc76f9d0ce82e1ff6c30cc3591e5.zip"], strip_prefix = "googletest-609281088cfefc76f9d0ce82e1ff6c30cc3591e5", )
  • Incremental Builds for Haskell with Bazel
    7 projects | news.ycombinator.com | 23 Jun 2022
    Yeah the cross-compilation thing is definitely a rough spot. I have one project that's able to work around it via extensive hacks with macros, but at some point I'll need to do it "the right way."

    Honestly if the docs had a canonical example of e.g. using unix_cc_toolchain_config (example: [0]) + Bootlin to compile for aarch64, it'd probably go a long way to making things understandable. Because say what you will about the old CROSSTOOL approach, at least there was a nice tutorial for it.

    [0] https://github.com/grailbio/bazel-toolchain/blob/f14a8a5de8f...

  • Cross-compiling to linux on MacOS with cgo
    2 projects | reddit.com/r/bazel | 9 Apr 2021
    I'm really not familiar with this issue or Go nor C++ overall, but if all you need is to set up a C++ toolchain, this should be quite simple and solve your issue.
  • WebAssembly
    9 projects | news.ycombinator.com | 27 Feb 2021
    The trick is that to provide Bazel with a custom toolchain involves way more than just setting an environment variable, because Bazel wants to control installing and making available the compiler reliably (e.g., what if `emcc` is not present on the system where Bazel was invoked? Bazel solves that problem by fetching it and building it for that system)

    There are projects that provide drop-in support for custom toolchains (e.g., we use this project[0] in Sorbet to fetch and build a custom LLVM/Clang toolchain for every host we build on (rather than relying on the system toolchain). But I'm not aware of a project that has done that for Emscripten. Maybe it would be as easy as plucking out what we've done in our project into a project that others could depend on, but to quote a colleague:

    > Setting up a cc toolchain in Bazel is a unique sort of pain.

    [0] https://github.com/grailbio/bazel-toolchain/

nixpkgs

Posts with mentions or reviews of nixpkgs. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-02-06.
  • Trouble with sxhkd (bspwm)
    4 projects | reddit.com/r/NixOS | 6 Feb 2023
    I haven't really used bspwm and sxhkd, but from nixpkgs it seems all the inputs from *.configFile just get used in a command such as $ sxhkd/bspw -c . So I'm guessing, if it's possible to run a complete config through a single command, you should write it up like such and not like the actual config file. It probably just works with bspwm because its a single command.
    4 projects | reddit.com/r/NixOS | 6 Feb 2023
    I'm beginning to think that i don't fully understand this line of the nixpkgs :
  • Ask HN: Is anyone successfully self-hosting Firefox Sync?
    10 projects | news.ycombinator.com | 6 Feb 2023
    I briefly considered it, but there are some big problems:

    - The new replacement package, syncserver-rs, has already been added to Nixpkgs with a NixOS module [0]

    - Python 2 and the package itself are no longer supported, meaning...

    - support in Nixpkgs is pretty rough - dependencies have been updated such that they no longer support Python 2, or have been removed outright, meaning...

    - syncserver has already been removed from Nixpkgs

    - in order to avoid the problem of unsupported dependencies, I delegated it to a community project, poetry2nix[1]. Even so,it was a nightmare to get working, lots of hacks and workarounds were needed

    Of course, my repo is public, so anyone is welcome to use the Flake within. If they do, I'd suggest dropping me a line so I don't do anything drastic to the package or module.

    [0] https://github.com/NixOS/nixpkgs/pull/176835

  • polkit auth agent troubles
    2 projects | reddit.com/r/voidlinux | 4 Feb 2023
  • Working power.ups/NUT netserver config for NixOS 22.11
    3 projects | reddit.com/r/NixOS | 2 Feb 2023
    I'm also working on power.ups improvements in this PR https://github.com/NixOS/nixpkgs/pull/213006 so please let me know your painpoints and wishlist items.
    3 projects | reddit.com/r/NixOS | 2 Feb 2023
    Took newAM's standalone config from here: https://github.com/NixOS/nixpkgs/issues/91681 and heavily modified it to make it work over a lan.
  • Package availability
    3 projects | reddit.com/r/NixOS | 30 Jan 2023
    I already filed an issue: https://github.com/NixOS/nixpkgs/issues/201507
    3 projects | reddit.com/r/NixOS | 30 Jan 2023
    PiHole-wise there are a bunch of 3rd party solutions on the pull request. I don't know enough about pihole to discuss them though.
  • [Question] unable to install packages after computer crash
    2 projects | reddit.com/r/NixOS | 30 Jan 2023
  • Ask HN: What Next After Ubuntu?
    7 projects | news.ycombinator.com | 29 Jan 2023
    I'd say it's really about the documentation, including "unofficial" documentation like bug reports and SO questions. Part of why Ubuntu is so popular is because there's enough of a community that whatever issue you hit, someone's probably already hit it before and asked about it on SO, where it has a highly upvoted answer that fixes the issue and explains it. That's also why NixOS seemed like a better choice than Guix to me.

    One thing I ran into was setting up a Python project using poetry2nix. Mostly works great, but then you sometimes get inscrutable error messages. I had to copy this into a shell.nix file for reasons that aren't entirely clear to me (and I had to hunt it down from https://github.com/NixOS/nixpkgs myself instead of finding docs or a bug report):

        astunparse = super.astunparse.overridePythonAttrs

What are some alternatives?

When comparing bazel-toolchain and nixpkgs you can also consider the following projects:

asdf - Extendable version manager with support for Ruby, Node.js, Elixir, Erlang & more

Home Manager using Nix - Manage a user environment using Nix [[email protected]]

git-lfs - Git extension for versioning large files

easyeffects - Limiter, compressor, convolver, equalizer and auto volume and many other plugins for PipeWire applications

daedalus - The open source cryptocurrency wallet for ada, built to grow with the community

youtube-dl-gui - A cross-platform GUI for youtube-dl made in Electron and node.js

devshell - Per project developer environments

HomeBrew - 🍺 The missing package manager for macOS (or Linux)

nonguix

nixos - My NixOS Configurations

Emu68 - M68K emulation for AArch64/AArch32

spack - A flexible package manager that supports multiple versions, configurations, platforms, and compilers.