fetchgit: Add support for specifying branch name
This is useful when `leaveDotGit = true` and some other derivation expects some branch name to exist. Previously, `nix-prefetch-git` always created a branch with a hard-coded name (`fetchgit`).
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
in
|
||||
{ url, rev ? "HEAD", md5 ? "", sha256 ? "", leaveDotGit ? deepClone
|
||||
, fetchSubmodules ? true, deepClone ? false
|
||||
, branchName ? null
|
||||
, name ? urlToName url rev
|
||||
}:
|
||||
|
||||
@@ -51,7 +52,7 @@ stdenv.mkDerivation {
|
||||
outputHashMode = "recursive";
|
||||
outputHash = if sha256 == "" then md5 else sha256;
|
||||
|
||||
inherit url rev leaveDotGit fetchSubmodules deepClone;
|
||||
inherit url rev leaveDotGit fetchSubmodules deepClone branchName;
|
||||
|
||||
GIT_SSL_CAINFO = "${cacert}/etc/ca-bundle.crt";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user