Skip to content

allow installables without drvPath #7417

@tomberek

Description

@tomberek

Installables that point to a builtins.storePath or builtins.fetchClosure cannot be used from the command line due to not having a drvPath, yet they can be used if wrapped in a builtins:buildenv or any other derivation wrapper.

Describe the solution you'd like
Allow usage of installables (even flake references) without requiring them to have drvPath's.

Describe alternatives you've considered

  • Wrapping each such installable in a builtins:buildenv, which works.
  • I tried following the source. It seems that goals need a name, and for attribute/flakerefs it needs a drvPath to "name" the goal, but otherwise it looks like an artificial limitation.
  • nix build $(nix eval --impure .#some-attr-with-builtins-storePath) works, which is odd because one would think this could be done automatically

Priorities

Add 👍 to issues you find important.

Metadata

Metadata

Assignees

Labels

featureFeature request or proposalidea approvedThe given proposal has been discussed and approved by the Nix team. An implementation is welcome.

Projects

Status

🏁 Review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions