bazel: test a real-world workspace that uses rules_go and rules_nodejs #43507
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for this change
Currently, Bazel installed on NixOS does work on a project that uses rules_go and rules_nodejs.
The purpose of this PR is to open a discussion on what can we do to get rules such as
rules_go
andrules_nodejs
work with no changes, or with minimal changes, to the actual project.For nodejs, I tried using node_path, but that does not work either since the rules assume you are pointing to the root of the node installation, which works for node itself but does not work for yarn; It tries to execute
${node_path}/bin/node ${yarn_path}/bin/yarn.js
. The derivationnixos.yarn
providesbin/yarn
, so it does not match it and it fails. Besides, this is an actual change to the project that will affect everyone with or without Nix.cc @mboes @volth @Profpatsch
On ArchLinux: