builtins.fetchgit: Support a "name" attribute
The "name" attribute defaults to "source", which we should use for all similar functions (e.g. fetchTarball and in Hydra) to ensure that we get a consistent store path regardless of how the tree is fetched. "source" is not necessarily a correct label, but using an empty name is problematic: you get an ugly store path ending in a dash, and it's impossible to have a fixed-output derivation that produces that path because ".drv" is not a valid store name. Fixes #904.
This commit is contained in:
parent
c1ae18941a
commit
65b5f177b5
2 changed files with 18 additions and 11 deletions
|
@ -9,6 +9,7 @@ namespace nix {
|
|||
class Store;
|
||||
|
||||
Path exportGit(ref<Store> store, const std::string & uri,
|
||||
const std::string & ref, const std::string & rev = "");
|
||||
const std::string & ref, const std::string & rev = "",
|
||||
const std::string & name = "");
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue