File tree Expand file tree Collapse file tree 5 files changed +30
-6
lines changed Expand file tree Collapse file tree 5 files changed +30
-6
lines changed Original file line number Diff line number Diff line change @@ -13,3 +13,6 @@ matrix-*.json
1313shardMatrix.json
1414
1515.vscode
16+
17+ # Pre Commit
18+ .pre-commit-config.yaml
Original file line number Diff line number Diff line change 11{
22 lib ,
3+ inputs ,
34 ...
45} :
56{
2829 nix-fast-build
2930 ;
3031 inherit ( self' . legacyPackages . inputs . ethereum-nix ) foundry ;
32+
33+ pre-commit-check = import ./pre-commit.nix { inherit inputs system ; } ;
3134 }
3235 // optionalAttrs ( system == "x86_64-linux" || system == "aarch64-darwin" ) {
3336 inherit ( self' . legacyPackages . inputs . ethereum-nix ) geth ;
Original file line number Diff line number Diff line change 1+ { inputs , system , ... } :
2+ inputs . pre-commit-hooks . lib . ${ system } . run {
3+ src = ../. ;
4+ hooks = {
5+ nixfmt-rfc-style . enable = true ;
6+ } ;
7+ }
Original file line number Diff line number Diff line change 246246 system ,
247247 pkgs ,
248248 inputs' ,
249+ self' ,
249250 ...
250251 } :
251252 {
252253 _module . args . pkgs = import nixpkgs {
253254 inherit system ;
254255 config . allowUnfree = true ;
255256 } ;
256- devShells . default = import ./shells/default.nix { inherit pkgs flake inputs' ; } ;
257+ devShells . default = import ./shells/default.nix {
258+ inherit
259+ pkgs
260+ flake
261+ inputs'
262+ self'
263+ ;
264+ } ;
257265 devShells . ci = import ./shells/ci.nix { inherit pkgs ; } ;
258266 } ;
259267 flake . lib . create =
Original file line number Diff line number Diff line change 11{
2+ self' ,
23 pkgs ,
3- flake ,
44 inputs' ,
55 ...
66} :
@@ -27,10 +27,13 @@ pkgs.mkShell {
2727 inputs' . dlang-nix . packages . dmd
2828 inputs' . dlang-nix . packages . dub
2929 act
30+ self' . checks . pre-commit-check . enabledPackages
3031 ] ;
3132
32- shellHook = ''
33- export REPO_ROOT="$PWD"
34- figlet -t "${ flake . description } "
35- '' ;
33+ shellHook =
34+ ''
35+ export REPO_ROOT="$PWD"
36+ figlet -t "Metacraft Nixos Modules"
37+ ''
38+ + self' . checks . pre-commit-check . shellHook ;
3639}
You can’t perform that action at this time.
0 commit comments