mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-22 18:30:43 -06:00
refactor checks
This commit is contained in:
parent
1042da2886
commit
097dc5677f
2 changed files with 54 additions and 36 deletions
26
lib/checks.nix
Normal file
26
lib/checks.nix
Normal 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"
|
||||||
|
'';
|
||||||
|
|
||||||
|
}
|
|
@ -25,19 +25,7 @@ let
|
||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
forAllSystems = f: genAttrs supportedSystems (system: f (import nixpkgs { inherit system; }));
|
forAllSystems = f: genAttrs supportedSystems (system: f (import nixpkgs { inherit system; }));
|
||||||
|
oizysModules = listToAttrs (findModulesList ../modules);
|
||||||
nixosModules = listToAttrs (findModulesList ../modules);
|
|
||||||
|
|
||||||
mkPackageCheck =
|
|
||||||
{ packages, pkgs }:
|
|
||||||
pkgs.runCommandLocal "build-third-party"
|
|
||||||
{
|
|
||||||
src = ./.;
|
|
||||||
nativeBuildInputs = [ packages ];
|
|
||||||
}
|
|
||||||
''
|
|
||||||
mkdir "$out"
|
|
||||||
'';
|
|
||||||
|
|
||||||
mkSystem =
|
mkSystem =
|
||||||
hostName:
|
hostName:
|
||||||
|
@ -70,7 +58,7 @@ rec {
|
||||||
oizys-go = pkgs.callPackage ../pkgs/oizys/oizys-go { };
|
oizys-go = pkgs.callPackage ../pkgs/oizys/oizys-go { };
|
||||||
default = oizys-go;
|
default = oizys-go;
|
||||||
});
|
});
|
||||||
devShells = forAllSystems (pkgs: {
|
oizysShells = forAllSystems (pkgs: {
|
||||||
default = pkgs.mkShell {
|
default = pkgs.mkShell {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
git
|
git
|
||||||
|
@ -79,30 +67,34 @@ rec {
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
oizysChecks = forAllSystems (pkgs: import ./checks.nix { inherit pkgs inputs; });
|
||||||
|
oizysFormatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
|
||||||
oizysFlake = {
|
oizysFlake = {
|
||||||
nixosModules = nixosModules;
|
nixosModules = oizysModules;
|
||||||
nixosConfigurations = oizysHosts;
|
nixosConfigurations = oizysHosts;
|
||||||
packages = oizysPkg;
|
packages = oizysPkg;
|
||||||
devShells = devShells;
|
devShells = oizysShells;
|
||||||
formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
|
formatter = oizysFormatter;
|
||||||
checks = forAllSystems (pkgs: {
|
checks = oizysChecks;
|
||||||
packageCheck = mkPackageCheck {
|
# checks = forAllSystems (pkgs: {
|
||||||
inherit pkgs;
|
# packageCheck = mkPackageCheck {
|
||||||
# make sure lix is in this?
|
# inherit pkgs;
|
||||||
packages = [
|
# # make sure lix is in this?
|
||||||
pkgs.pixi
|
# packages = [
|
||||||
pkgs.swww
|
# pkgs.pixi
|
||||||
|
# pkgs.swww
|
||||||
inputs.tsm.packages.${pkgs.system}.default
|
#
|
||||||
inputs.hyprman.packages.${pkgs.system}.default
|
# 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.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
|
# inputs.zls.outputs.packages.${pkgs.system}.default
|
||||||
];
|
# inputs.zig2nix.outputs.packages.${pkgs.system}.zig.master.bin
|
||||||
};
|
# ];
|
||||||
});
|
#
|
||||||
|
# };
|
||||||
|
# });
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue