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
2
flake.lock
generated
2
flake.lock
generated
|
|
@ -491,7 +491,7 @@
|
|||
},
|
||||
"locked": {
|
||||
"lastModified": 1,
|
||||
"narHash": "sha256-Q/Olk0t2aJYk5GMcWo+LQl5skS7H0A45SSlevBDKceo=",
|
||||
"narHash": "sha256-RX3FZ1Yk67ZC5A0mf27T2AhEKDqLE3R5LvmMpuJvrFI=",
|
||||
"path": "lib",
|
||||
"type": "path"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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