handle melpa new fetchers in libgenerated.nix

This commit is contained in:
Osama Rebach 2022-09-18 02:12:37 +01:00
parent b43f6f58c9
commit 0d012fb1b7
No known key found for this signature in database
GPG Key ID: 848FD31409528F28
2 changed files with 15 additions and 1 deletions

View File

@ -45,6 +45,18 @@ let
inherit sha256 url;
}
) {};
sourcehut = self.callPackage ({ fetchzip }:
fetchzip {
url = "https://git.sr.ht/~${repo}/archive/${commit}.tar.gz";
inherit sha256;
}
) {};
codeberg = self.callPackage ({ fetchzip }:
fetchzip {
url = "https://codeberg.org/${repo}/archive/${commit}.tar.gz";
inherit sha256;
}
) {};
};
in {

View File

@ -214,7 +214,9 @@ return Promise to resolve in that process."
`((fetcher . ,fetcher))
(if (or (equal "github" fetcher)
(equal "bitbucket" fetcher)
(equal "gitlab" fetcher))
(equal "gitlab" fetcher)
(equal "sourcehut" fetcher)
(equal "codeberg" fetcher))
`((repo . ,repo))
`((url . ,url)))
(when unstable-aprops `((unstable . ,(source-info entry unstable-archive unstable-sha))))