Skip to content

lib.buildInputsClosureCond: init#465394

Open
roberth wants to merge 1 commit intoNixOS:masterfrom
roberth:buildInputsClosureCond
Open

lib.buildInputsClosureCond: init#465394
roberth wants to merge 1 commit intoNixOS:masterfrom
roberth:buildInputsClosureCond

Conversation

@roberth
Copy link
Member

@roberth roberth commented Nov 26, 2025

Add a function to compute filtered closures of build dependencies.

Given a predicate and a starting set of derivations, this computes the transitive closure by recursively traversing buildInputs and propagatedBuildInputs, including only dependencies that satisfy the predicate.

This is useful for dev shells that need to selectively include only internal or external dependencies while maintaining semantic coherence (runtime dependencies only).

Example:

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

Add a function to compute filtered closures of build dependencies.

Given a predicate and a starting set of derivations, this computes the
transitive closure by recursively traversing buildInputs and
propagatedBuildInputs, including only dependencies that satisfy the
predicate.

This is useful for dev shells that need to selectively include only
internal or external dependencies while maintaining semantic coherence
(runtime dependencies only).
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 6.topic: lib The Nixpkgs function library labels Nov 26, 2025
@roberth roberth force-pushed the buildInputsClosureCond branch from c848cea to 5178b45 Compare November 26, 2025 22:14
@nixpkgs-ci nixpkgs-ci bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Jan 27, 2026
@nixpkgs-ci nixpkgs-ci bot requested a review from a team February 10, 2026 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: merge conflict This PR has merge conflicts with the target branch 6.topic: lib The Nixpkgs function library 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant