diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-10-30T08·57+0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-10-30T09·22+0100 |
commit | 65b5f177b5fbb1b0778ede047a13a3cee9c59cfe (patch) | |
tree | cc5ba83c50ae5d528cd1c4c4770b9b66f3e1878a /src/libexpr/primops/fetchgit.hh | |
parent | c1ae18941a222d51a47d4971f4bc4cbc5dea449a (diff) |
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.
Diffstat (limited to 'src/libexpr/primops/fetchgit.hh')
-rw-r--r-- | src/libexpr/primops/fetchgit.hh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libexpr/primops/fetchgit.hh b/src/libexpr/primops/fetchgit.hh index ff228f3b3c6a..4bf34b76f8dc 100644 --- a/src/libexpr/primops/fetchgit.hh +++ b/src/libexpr/primops/fetchgit.hh @@ -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 = ""); } |