Skip to content

Commit

Permalink
refactor(packages): Move checks in different folder
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinNikov committed Dec 20, 2024
1 parent 68e732c commit 2336e10
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 36 deletions.
64 changes: 64 additions & 0 deletions checks/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
lib,
inputs,
...
}:
{
perSystem =
{
inputs',
self',
pkgs,
...
}:
let
inherit (lib) optionalAttrs;
inherit (pkgs) system;
inherit (pkgs.hostPlatform) isLinux;
in
rec {
checks =
self'.packages
// {
inherit (self'.legacyPackages) rustToolchain;
inherit (self'.legacyPackages.inputs.dlang-nix) dub;
inherit (self'.legacyPackages.inputs.nixpkgs)
cachix
nix
nix-eval-jobs
nix-fast-build
;
inherit (self'.legacyPackages.inputs.ethereum-nix) foundry;

pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run {
src = ../.;
hooks = {
nixfmt-rfc-style.enable = true;
};
};
}
// optionalAttrs (system == "x86_64-linux" || system == "aarch64-darwin") {
inherit (self'.legacyPackages.inputs.ethereum-nix) geth;
}
// optionalAttrs isLinux {
inherit (inputs'.validator-ejector.packages) validator-ejector;
}
// optionalAttrs (system == "x86_64-linux") {
inherit (pkgs) terraform;
inherit (self'.legacyPackages.inputs.terranix) terranix;
inherit (self'.legacyPackages.inputs.dlang-nix)
dcd
dscanner
serve-d
dmd
ldc
;
inherit (self'.legacyPackages.inputs.ethereum-nix)
mev-boost
nethermind
web3signer
nimbus-eth2
;
};
};
}
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@
in
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
./checks
./modules
./packages
];
Expand Down
36 changes: 0 additions & 36 deletions packages/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -72,41 +72,5 @@
inherit (legacyPackages.inputs.nixpkgs) cachix nix nix-eval-jobs;
};
};
checks =
packages
// {
inherit (legacyPackages) rustToolchain;
inherit (legacyPackages.inputs.dlang-nix) dub;
inherit (legacyPackages.inputs.nixpkgs)
cachix
nix
nix-eval-jobs
nix-fast-build
;
inherit (legacyPackages.inputs.ethereum-nix) foundry;
}
// optionalAttrs (system == "x86_64-linux" || system == "aarch64-darwin") {
inherit (legacyPackages.inputs.ethereum-nix) geth;
}
// optionalAttrs isLinux {
inherit (inputs'.validator-ejector.packages) validator-ejector;
}
// optionalAttrs (system == "x86_64-linux") {
inherit (pkgs) terraform;
inherit (legacyPackages.inputs.terranix) terranix;
inherit (legacyPackages.inputs.dlang-nix)
dcd
dscanner
serve-d
dmd
ldc
;
inherit (legacyPackages.inputs.ethereum-nix)
mev-boost
nethermind
web3signer
nimbus-eth2
;
};
};
}

0 comments on commit 2336e10

Please sign in to comment.