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

[nix-outputs] Fix flake installable with custom outouts #1864

Merged
merged 2 commits into from
Feb 28, 2024

Conversation

mikeland73
Copy link
Contributor

Summary

Fixes #1852

Ensure we initialize outputs using flake if package is a flake.

Made outputs non-pointer so we don't have to worry about initialization.

How was it tested?

Installed github:nixos/nixpkgs#curl^out,dev and verified that flake and profile contain both outputs.

@mikeland73 mikeland73 merged commit bc49261 into main Feb 28, 2024
24 checks passed
@mikeland73 mikeland73 deleted the landau/fix-flake-outputs branch February 28, 2024 20:19
@@ -121,7 +121,7 @@ func PackageFromStringWithOptions(raw string, locker lock.Locker, opts devopt.Ad
pkg := PackageFromStringWithDefaults(raw, locker)
pkg.DisablePlugin = opts.DisablePlugin
pkg.PatchGlibc = opts.PatchGlibc
pkg.outputs = initOutputs(opts.Outputs)
pkg.initOutputs(opts.Outputs)
Copy link
Collaborator

@savil savil Feb 28, 2024

Choose a reason for hiding this comment

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

I think line 117 above needs pkg.initOutputs, for when the raw is a flake-ref-with-flake-outputs

mikeland73 added a commit that referenced this pull request Feb 29, 2024
## Summary

Ensure flake packages always parse outputs. (re-do of
#1864)

This approach is more general. It also supports (with some small
changes) the use of devbox output flags with flakes (e.g. `devbox add
github:nixos/nixpkgs#curl --outputs out,dev`)

## How was it tested?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Curl flake with ^out,dev not adding dynamic libraries
3 participants