-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Command-line overrides for installables #5766
Comments
I marked this as stale due to inactivity. → More info |
Why are feature request issues being made stale??? |
Because they've gone without activity for a long time, in other words "stale"? I hate auto-closing bots as much as the next guy, but just labelling someting "stale" when in fact it is stale, without closing the issue, seems only fair to me. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(This should probably be turned into an RFC at some point)
Is your feature request related to a problem? Please describe.
nixpkgs provides the
override
andoverrideAttrs
patterns to easily customize preexisting derivations. These have never been particularly usable over the command line, usually requiring patterns like$ nix build --impure --expr '(import <nixpkgs> {}).package.override { ... }'
With flakes standardizing the concept of installables, maybe we can have a go at this?
Describe the solution you'd like
Similar to
nix eval
's--expr
, there should be a way to apply overrides to derivations supporting them.Some examples of how this could look like:
https://github.com/max-privatevoid/nix/tree/cli-overrides currently implements a rudimentary base for this concept. It allows you to do this:
$ nix build nixpkgs#ffmpeg --apply-to-installable 'x: x.override { libmfxSupport = true; }'
Things to figure out:
installable
in--override-pkg installable
be a non-value (e.g.--override-pkg /nix/store/xxxxxxx-newpackage
)?apps
withSomething
) and dependency arguments. This is a nixpkgs issue.pkg1.override { dep1 = pkg2.override { dep2 = newPkg3; }; }
Describe alternatives you've considered
Wait for https://gist.github.com/edolstra/29ce9d8ea399b703a7023073b0dbc00d#user-interface
The text was updated successfully, but these errors were encountered: