mirror of
https://gitlab.com/TECHNOFAB/nix-gitlab-ci.git
synced 2025-12-12 02:00:13 +01:00
feat: initial v3 rewrite
This commit is contained in:
commit
0952ab4145
32 changed files with 1457 additions and 0 deletions
26
lib/default.nix
Normal file
26
lib/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
args: let
|
||||
# allow passing just pkgs aswell for convenience
|
||||
lib = args.lib or args.pkgs.lib;
|
||||
# makes it optional to pass if it's not explicitly needed
|
||||
pkgs = args.pkgs or (throw "[nix-gitlab-ci] pkgs argument was used but not set, please pass it");
|
||||
inherit (lib) evalModules;
|
||||
|
||||
impl = import ./impl {inherit lib pkgs cilib;};
|
||||
|
||||
cilib = {
|
||||
inherit (impl) helpers modules mkPipeline mkJobRun mkJobDeps mkJobPatched;
|
||||
utils = import ./utils.nix {inherit pkgs;};
|
||||
version = builtins.readFile ./VERSION;
|
||||
|
||||
mkCI = config:
|
||||
(evalModules {
|
||||
modules = [
|
||||
cilib.modules.nixCiSubmodule
|
||||
{
|
||||
inherit config;
|
||||
}
|
||||
];
|
||||
}).config;
|
||||
};
|
||||
in
|
||||
cilib
|
||||
Loading…
Add table
Add a link
Reference in a new issue