-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
Fetcher improvements #59858
Fetcher improvements #59858
Conversation
Eval failure exists on staging as well. |
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.
Note that the sources are named "source" on purpose, see:
- c3255fe8ec32
- NixOS/nix@65b5f17
- Add name argument to builtins.fetchTarball and builtins.fetchgit nix#904
and I think @domenkozar did a talk on why this was a good change. We should talk a bit on if it is a good idea to go back to the previous way. cc @edolstra
One of the points raised in favor of this is the idea that the let
pkgs = import <nixpkgs> {};
srcWithName = name: pkgs.fetchgit {
inherit name;
url = "https://github.com/grahamc/ish.git";
rev = "7edd7665edf8e33e6847d891d2ff519b492b32dc";
sha256 = "0qjp8f82a09spz8z2idqj3w1lclr19p37877a8jscvss5a14bbda";
};
in pkgs.writeText "example" ''
${srcWithName "hi"}
${srcWithName "there"}
${srcWithName "the"}
${srcWithName "hash"}
${srcWithName "is"}
${srcWithName "unchanged"}
'' |
@GrahamcOfBorg eval |
Note the eval error on staging was fixed, and the error now is due to changes in this PR. |
Indeed the use of |
Motivation for this change
More clarity in store path names, more abstraction
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)