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:
Marien Zwart 2024-07-02 22:15:19 +10:00
parent 37da9ce045
commit 969837731b
No known key found for this signature in database

View file

@ -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))