-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
#4
base: master
Are you sure you want to change the base?
Introduce a new overrideInputs
on {default,shell}Nix
#4
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»
I tested this and it seems to work fine |
This breaks on the dwarffs flake (https://github.com/edolstra/dwarffs/tree/9861d09c7a22f86d44e41d5ac049e7b4a8d1998d) with an "expected a string but found a list" error, presumably due to the structure of the nixpkgs follow. |
- downgrade mitmproxy to avoid breakage - add test for pip lock script - fix bug in flake compat implementation (nix-community/flake-compat#4 (comment)) - small fix in docs for lock and eval-cache - fix lock refresh script: don't swallow errors
- downgrade mitmproxy to avoid breakage - add test for pip lock script - fix bug in flake compat implementation (nix-community/flake-compat#4 (comment)) - small fix in docs for lock and eval-cache - fix lock refresh script: don't swallow errors
rootOverrides = | ||
mapAttrs' | ||
(input: lockKey: nameValuePair lockKey (impureOverrides.${input} or null)) | ||
lockFile.nodes.${lockFile.root}.inputs; | ||
|
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.
rootOverrides = | |
mapAttrs' | |
(input: lockKey: nameValuePair lockKey (impureOverrides.${input} or null)) | |
lockFile.nodes.${lockFile.root}.inputs; | |
rootOverrides = | |
mapAttrs' | |
(input: lockKey': let | |
lockKey = | |
if builtins.isList lockKey' | |
then builtins.concatStringsSep "/" lockKey' | |
else lockKey'; | |
in | |
nameValuePair lockKey (impureOverrides.${input} or null)) | |
lockFile.nodes.${lockFile.root}.inputs; |
- downgrade mitmproxy to avoid breakage - add test for pip lock script - fix bug in flake compat implementation (nix-community/flake-compat#4 (comment)) - small fix in docs for lock and eval-cache - fix lock refresh script: don't swallow errors
- downgrade mitmproxy to avoid breakage - add test for pip lock script - fix bug in flake compat implementation (nix-community/flake-compat#4 (comment)) - small fix in docs for lock and eval-cache - fix lock refresh script: don't swallow errors
- downgrade mitmproxy to avoid breakage - add test for pip lock script - fix bug in flake compat implementation (nix-community/flake-compat#4 (comment)) - small fix in docs for lock and eval-cache - fix lock refresh script: don't swallow errors
- downgrade mitmproxy to avoid breakage - add test for pip lock script - fix bug in flake compat implementation (nix-community/flake-compat#4 (comment)) - small fix in docs for lock and eval-cache - fix lock refresh script: don't swallow errors
- downgrade mitmproxy to avoid breakage - add test for pip lock script - fix bug in flake compat implementation (nix-community/flake-compat#4 (comment)) - small fix in docs for lock and eval-cache - fix lock refresh script: don't swallow errors
For some reason this PR skipped my attention.. what is the status of it? |
@zimbatm If I understand correctly, @DavHau's suggestion will fix the issue mentioned @alois31, which is that doing something like |
- downgrade mitmproxy to avoid breakage - add test for pip lock script - fix bug in flake compat implementation (nix-community/flake-compat#4 (comment)) - small fix in docs for lock and eval-cache - fix lock refresh script: don't swallow errors
Porting edolstra#49 with some edits to avoid re-indentation and to fix a null reference bug.
This allows the user of this non-flake to have similar functionality to
follows
.Example (default.nix):