fetchFromGitHub: force re-fetch when rev changes
Prefix the default value of `name` with `rev` to force re-fetch everytime `rev` changes.
This commit is contained in:
parent
be166796d2
commit
ff4126b6ba
|
@ -1,7 +1,9 @@
|
|||
{ lib, fetchgit, fetchzip }:
|
||||
|
||||
lib.makeOverridable (
|
||||
{ owner, repo, rev, name ? "source"
|
||||
{ owner, repo, rev
|
||||
, name ? null # Override with null to use the default value
|
||||
, pname ? "source-${owner}-${repo}"
|
||||
, fetchSubmodules ? false, leaveDotGit ? null
|
||||
, deepClone ? false, private ? false, forceFetchGit ? false
|
||||
, sparseCheckout ? []
|
||||
|
@ -11,6 +13,8 @@ lib.makeOverridable (
|
|||
}@args:
|
||||
|
||||
let
|
||||
name = if args.name or null != null then args.name
|
||||
else "${pname}-${rev}";
|
||||
|
||||
position = (if args.meta.description or null != null
|
||||
then builtins.unsafeGetAttrPos "description" args.meta
|
||||
|
|
Loading…
Reference in a new issue