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 trimWith; impl = import ./impl {inherit lib pkgs cilib;}; cilib = { inherit (impl) helpers modules mkPipeline mkJobRun mkJobDeps mkJobPatched; utils = import ./utils.nix {inherit pkgs;}; version = trimWith { start = true; end = true; } (builtins.readFile ./VERSION); mkCI = config: (evalModules { modules = [ cilib.modules.nixCiSubmodule { inherit config; } ]; }).config; }; in cilib