Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement remaining nix_pkg tags #369

Merged
merged 19 commits into from
Apr 17, 2023
Merged

Implement remaining nix_pkg tags #369

merged 19 commits into from
Apr 17, 2023

Conversation

aherrmann
Copy link
Member

@aherrmann aherrmann commented Apr 12, 2023

Depends on #364
Part of #183.

Implement the remaining local_file and local_expr nix_pkg tags.
Add support for nixopts handling. (Apart from location expansion, see below).
Ensure each of them is tested in testing/core.

Note on location expansion: The implementation of location expansion for repository rules needs to know the labels as seen at the definition site of the location expansion expression, i.e. the user's MODULE.bazel file. But, the module extension implementation only sees the resolved labels, not their raw string form. The repository rules were able to work around this using a wrapper macro. But, MODULE.bazel files cannot call macros, meaning this workaround is not available.

@aherrmann aherrmann requested a review from benradf as a code owner April 12, 2023 16:17
@aherrmann aherrmann changed the base branch from master to nix_repo_tags April 12, 2023 16:20
Base automatically changed from nix_repo_tags to master April 12, 2023 16:45
@dpulls
Copy link

dpulls bot commented Apr 12, 2023

🎉 All dependencies have been resolved !

@aherrmann aherrmann changed the title Implement remaining nix_repo tags Implement remaining nix_pkg tags Apr 17, 2023
Copy link
Member

@benradf benradf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

Comment on lines -60 to +49
"$(locations @output-filegroup-test//:include)",
"$(locations {})".format(nix_pkg("rules_nixpkgs_core_testing", "output-filegroup-test", "//:include")),
],
data = ["@output-filegroup-test//:include"],
data = [nix_pkg("rules_nixpkgs_core_testing", "output-filegroup-test", "//:include")],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was a bit confused why the nix_pkg module extension was being used like this, but now I see nix_pkg here is a helper macro from defs.bzl.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably something to make clear in the docs. Or, if we end up getting local_use_repo the problem would go away.

core/extensions/package.bzl Outdated Show resolved Hide resolved
@aherrmann aherrmann added the merge-queue merge on green CI label Apr 17, 2023
@mergify mergify bot merged commit 5ff160b into master Apr 17, 2023
@mergify mergify bot deleted the nix_pkg_tags branch April 17, 2023 14:26
@mergify mergify bot removed the merge-queue merge on green CI label Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants