--apply for nix build #421

Open
opened 2024-06-25 20:32:34 +00:00 by pennae · 2 comments
Owner

nix eval has --apply to run an installable through a function before printing it. nix build does not. this is quite pointless because evaling something with --apply and building the resulting derivation in two separate steps works just fine.

Describe the solution you'd like

allow --apply in nix build.

## Is your feature request related to a problem? Please describe. `nix eval` has `--apply` to run an installable through a function before printing it. `nix build` does not. this is quite pointless because `eval`ing something with `--apply` and building the resulting derivation in two separate steps works just fine. ## Describe the solution you'd like allow `--apply` in `nix build`.
pennae added the
ux
label 2024-06-25 20:32:34 +00:00
Member

I frequently use nix-shell -p over nix shell because of the latter's inability to reference an expression relative to Nixpkgs, rather than simply an attrpath. nix shell --apply would provide an alternative (though might not be the best possible ergonomics for this case?).

I frequently use `nix-shell -p` over `nix shell` because of the latter's inability to reference an *expression* relative to Nixpkgs, rather than simply an attrpath. `nix shell --apply` would provide an alternative (though might not be the best possible ergonomics for this case?).
Owner

I believe there is a stale CppNix PR to make --apply work for all installables; we should see if that's cherry-pickable

I believe there is a stale CppNix PR to make `--apply` work for all installables; we should see if that's cherry-pickable
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#421
No description provided.