Skip to content

Add support for multi-output derivations - #782

Open
jlesquembre wants to merge 2 commits into
masterfrom
jl/multi-output-derivations
Open

jlesquembre wants to merge 2 commits into
masterfrom
jl/multi-output-derivations

Conversation

@jlesquembre

Copy link
Copy Markdown
Member

Fixes #595

@jlesquembre
jlesquembre requested a review from a team as a code owner October 8, 2026 12:58
Comment thread testing/core/MODULE.bazel
nix_flake_file = "//:flake.nix",
nix_flake_lock_file = "//:flake.lock",
package = "curl",
)

@avdv avdv Oct 9, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Instead of having to provide different flake package outputs in the flake.nix file, I would prefer introducing an optional output attribute:

rules_nixpkgs.flake_package(
    name = "curl-bin",
    nix_flake_file = "//:flake.nix",
    nix_flake_lock_file = "//:flake.lock",
    package = "curl",
    output = "bin",
)

This should result in a call to nix build --output-link "out" '<flake>#<package>^<output>'. This should obviate the need to parse the output of the command; we can directly infer the output link from the name.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good point, I've updated the PR to match that interface.

@jlesquembre
jlesquembre force-pushed the jl/multi-output-derivations branch 3 times, most recently from d3d2ea4 to 9b9519e Compare October 16, 2026 16:22
@jlesquembre
jlesquembre force-pushed the jl/multi-output-derivations branch from 9b9519e to fb5e158 Compare October 16, 2026 16:25
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.

I'm able to use cowsay and hello, but I can't get curl to be exposed

2 participants