Use sourcehut fetcher
It looks like sourcehut does not allow shallow clones of arbitrary revs either. Use Nix's experimental archive fetcher for more optimal fetches.
This commit is contained in:
parent
37da9ce045
commit
969837731b
1 changed files with 10 additions and 0 deletions
10
default.nix
10
default.nix
|
|
@ -277,6 +277,16 @@ let
|
|||
type = "github";
|
||||
inherit owner repo;
|
||||
rev = pin;
|
||||
} else if lib.hasPrefix "https://git.sr.ht/" url
|
||||
then let
|
||||
tail = lib.removePrefix "https://git.sr.ht/" url;
|
||||
split = lib.splitString "/" tail;
|
||||
owner = lib.head split;
|
||||
repo = lib.elemAt split 1;
|
||||
in {
|
||||
type = "sourcehut";
|
||||
inherit owner repo;
|
||||
rev = pin;
|
||||
} else ({
|
||||
type = "git";
|
||||
} // fetchGitArgs))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue