mirror of
https://gitlab.com/TECHNOFAB/nixlets.git
synced 2025-12-12 01:50:05 +01:00
chore(lib): add fetchNixletFromGitlab function
This commit is contained in:
parent
ef74421f26
commit
eb1fd4cdd2
2 changed files with 10 additions and 1 deletions
|
|
@ -91,6 +91,15 @@ with lib; rec {
|
|||
};
|
||||
|
||||
fetchNixlet = url: sha256: mkNixlet (builtins.fetchTarball {inherit url sha256;});
|
||||
fetchNixletFromGitlab = {
|
||||
project,
|
||||
name,
|
||||
version,
|
||||
sha256,
|
||||
}: let
|
||||
projectEscaped = builtins.replaceStrings ["/"] ["%2F"] project;
|
||||
in
|
||||
fetchNixlet "https://gitlab.com/api/v4/projects/${projectEscaped}/packages/generic/${name}/${version}/${name}.tar.gz" sha256;
|
||||
|
||||
uploadNixletsToGitlab = {
|
||||
pkgs,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue