-
Notifications
You must be signed in to change notification settings - Fork 71
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
Introduce a new overrideInputs
on {default,shell}Nix
#49
base: master
Are you sure you want to change the base?
Conversation
This allows the user of this non-flake to have similar functionality to `follows`. Example (default.nix): nix-repl> (import ./.).default «derivation /nix/store/axgvq22kyb8ymchzq1mjayms4jdl6ni6-ledc-0.1.0.drv» nix-repl> ((import ./.).overrideInputs { nixpkgs = <nixpkgs>; }).default «derivation /nix/store/r8zw693hpg91yx6f57hyx1gk4zdiq2lm-ledc-0.1.0.drv»
Accept other forks also with type="github". This is enough to be a bit more convenient in a few more cases once this propagates into new future projects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense overall, and the diff isn't even that big when whitespace is ignored :)
in "${toString y'}${pad (toString m)}${pad (toString d)}${pad (toString hours)}${pad (toString minutes)}${pad (toString seconds)}"; | ||
|
||
rootOverrides = | ||
mapAttrs' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any particular reason to use mapAttrs'
and not mapAttrs
here?
if key == lockFile.root | ||
then rootSrc | ||
else | ||
if rootOverrides.${key} != null then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if rootOverrides.${key} != null then | |
if (rootOverrides.${key} or null) != null then |
@lheckemann some work continues in https://github.com/ElvishJerricco/flake-compat/tree/add-overrideInputs. i don't currently have the spoons for a review cycle, this may change by next week. if you're looking for this to get merged, it'd probably be wise to make a PR against https://github.com/nix-community/flake-compat 💜 |
The current head of the PR is broken, it is missing inputs, no matter if overrideInputs is used or not.
The PR at the nix-community flake-compat does work fine |
This allows the user of this non-flake to have similar functionality to
follows
.Example (default.nix):
It's currently only able to override our flake's direct inputs. Sorry for the big diff.