refactor checks

This commit is contained in:
Daylin Morgan 2024-06-16 17:13:19 -05:00
parent 1042da2886
commit 097dc5677f
Signed by: daylin
GPG key ID: 950D13E9719334AD
2 changed files with 54 additions and 36 deletions

26
lib/checks.nix Normal file
View file

@ -0,0 +1,26 @@
{ inputs, pkgs }:
{
makePackages =
pkgs.runCommandLocal "build-third-party"
{
src = ./.;
nativeBuildInputs = [
pkgs.pixi
pkgs.swww
inputs.tsm.packages.${pkgs.system}.default
inputs.hyprman.packages.${pkgs.system}.default
inputs.roc.packages.${pkgs.system}.full
inputs.roc.packages.${pkgs.system}.lang-server
inputs.zls.outputs.packages.${pkgs.system}.default
inputs.zig2nix.outputs.packages.${pkgs.system}.zig.master.bin
];
}
''
mkdir "$out"
'';
}

View file

@ -25,19 +25,7 @@ let
in
rec {
forAllSystems = f: genAttrs supportedSystems (system: f (import nixpkgs { inherit system; }));
nixosModules = listToAttrs (findModulesList ../modules);
mkPackageCheck =
{ packages, pkgs }:
pkgs.runCommandLocal "build-third-party"
{
src = ./.;
nativeBuildInputs = [ packages ];
}
''
mkdir "$out"
'';
oizysModules = listToAttrs (findModulesList ../modules);
mkSystem =
hostName:
@ -70,7 +58,7 @@ rec {
oizys-go = pkgs.callPackage ../pkgs/oizys/oizys-go { };
default = oizys-go;
});
devShells = forAllSystems (pkgs: {
oizysShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
packages = with pkgs; [
git
@ -79,30 +67,34 @@ rec {
};
});
oizysChecks = forAllSystems (pkgs: import ./checks.nix { inherit pkgs inputs; });
oizysFormatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
oizysFlake = {
nixosModules = nixosModules;
nixosModules = oizysModules;
nixosConfigurations = oizysHosts;
packages = oizysPkg;
devShells = devShells;
formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
checks = forAllSystems (pkgs: {
packageCheck = mkPackageCheck {
inherit pkgs;
# make sure lix is in this?
packages = [
pkgs.pixi
pkgs.swww
inputs.tsm.packages.${pkgs.system}.default
inputs.hyprman.packages.${pkgs.system}.default
inputs.roc.packages.${pkgs.system}.full
inputs.roc.packages.${pkgs.system}.lang-server
inputs.zls.outputs.packages.${pkgs.system}.default
inputs.zig2nix.outputs.packages.${pkgs.system}.zig.master.bin
];
};
});
devShells = oizysShells;
formatter = oizysFormatter;
checks = oizysChecks;
# checks = forAllSystems (pkgs: {
# packageCheck = mkPackageCheck {
# inherit pkgs;
# # make sure lix is in this?
# packages = [
# pkgs.pixi
# pkgs.swww
#
# inputs.tsm.packages.${pkgs.system}.default
# inputs.hyprman.packages.${pkgs.system}.default
#
# inputs.roc.packages.${pkgs.system}.full
# inputs.roc.packages.${pkgs.system}.lang-server
#
# inputs.zls.outputs.packages.${pkgs.system}.default
# inputs.zig2nix.outputs.packages.${pkgs.system}.zig.master.bin
# ];
#
# };
# });
};
}