Merged
Conversation
- Update the requirements and design based on the discussion on
`use_repo` and a potential future `use_local_repo`. Accordingly, we
should strive to generate external repositories under two different
kinds of names:
- Either globally valid, and in that case not mangled. These may later
be imported directly using the automated `use_repo` proposal
- Or only locally valid in the requesting module, and in that case
mangled by module name and version prefix. These may later be
imported directly using the automated `use_local_repo` idea.
- Simplify the notion of overrides.
- Bazel already has builtin features that support per module
overrides, such as `local_path_override`. In the spirit of
composability and reuse we shouldn't reimplement this functionality.
- Limit the provided functionality to global overrides as those cannot
easily be replicated with Bazel's builtin features.
- Remove the `import_name` attribute and instead use the same approach
as `nixpkgs_package`. The `NIX_PATH` is really a `nix-build` site
concern.
- Shorten the attribute names.
- Avoid the `global` identifier, it's a reserved keyword.
To factor out the commonly needed functionality for the `nix_repo` and `nix_pkg` generated hub repositories and others for toolchains later on.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Implements part of #183.
It's a relatively large change-set and probably easiest reviewed commit by commit. Refer to the commit messages for additional information.
use_repoand a potential futureuse_local_repoproposal. The relevant outcome is that repositories should either be global or scoped per module and the repository names should reflect this. Additionally, this simplivies overrides and removes theimport_nameattribute.nix_repoandnix_pkggenerated hub repositories.default,github, andoverridetags fornix_repo, andattrandlocal_attrtags fornix_pkg. Remaining tags will be implemented later.testing/coreto use thenix_repoandnix_pkgmodule extensions where already feasible.