diff --git a/nix/checks/default.nix b/nix/checks/default.nix index 20f0dd7..604a33f 100644 --- a/nix/checks/default.nix +++ b/nix/checks/default.nix @@ -5,4 +5,5 @@ { formatted = import ./formatted.nix { inherit inputs system; }; nixos = import ./nixos.nix { inherit inputs system; }; + lib = import ./lib.nix { inherit inputs system; }; } diff --git a/nix/checks/lib.nix b/nix/checks/lib.nix new file mode 100644 index 0000000..c6a8798 --- /dev/null +++ b/nix/checks/lib.nix @@ -0,0 +1,56 @@ +{ + inputs ? import ../inputs.nix, + system ? builtins.currentSystem or "unknown-system", + lib ? import ../lib { inherit inputs; }, + pkgs ? import ../nixpkgs.nix { inherit inputs system; }, + utils ? import ../utils.nix { inherit inputs; }, +}: +let + owner = "typhon"; + repo = "typhon-ci"; + typhonUrl = "https://etna.typhon-ci.org/"; + secrets = pkgs.writeText "secrets" ""; + all = { + github = + (lib.github.mkProject { + inherit + owner + repo + typhonUrl + secrets + ; + deploy = [ + { + name = "push to cachix"; + value = lib.cachix.mkPush { name = "typhon"; }; + } + { + name = "github pages"; + value = lib.github.mkPages { + inherit owner repo; + job = "main"; + customDomain = "typhon-ci.org"; + }; + } + ]; + }).actions; + gitea = + (lib.gitea.mkProject { + inherit + owner + repo + typhonUrl + secrets + ; + instance = "codeberg.org"; + }).actions; + dummy = (lib.dummy.mkProject { url = "github:typhon-ci/typhon"; }).actions; + git = lib.git.mkJobsets { url = "https://github.com/typhon-ci/typhon"; }; + }; +in +pkgs.stdenv.mkDerivation { + name = "check-typhon-lib"; + buildInputs = utils.lib.mapAttrsToList (_: x: x.${system}) all; + phases = [ "installPhase" ]; + installPhase = "touch $out"; +} diff --git a/nix/jobs.nix b/nix/jobs.nix index a3a6ecb..0b8ba33 100644 --- a/nix/jobs.nix +++ b/nix/jobs.nix @@ -10,5 +10,6 @@ in doc = import ./packages/doc.nix { inherit inputs system; }; formatted = import ./checks/formatted.nix { inherit inputs system; }; nixos = import ./checks/nixos.nix { inherit inputs system; }; + lib = import ./checks/lib.nix { inherit inputs system; }; }; }