File tree Expand file tree Collapse file tree 3 files changed +5
-11
lines changed Expand file tree Collapse file tree 3 files changed +5
-11
lines changed Original file line number Diff line number Diff line change 7878 system :
7979 let
8080 pkgs = nixpkgsFor . ${ system } . native ;
81- hooksSettings = import ./packaging/pre-commit-hook-settings.nix {
82- inherit lib pkgs ;
81+ hooksConfig = import ./packaging/pre-commit-hook-settings.nix {
82+ inherit pkgs lib ;
8383 src = self ;
8484 } ;
85- git-hooks = inputs . git-hooks-nix . lib . ${ system } ;
8685 in
87- {
88- check = git-hooks . run hooksSettings ;
89- settings = hooksSettings ;
90- } ;
86+ inputs . git-hooks-nix . lib . ${ system } . run ( hooksConfig // { src = self ; } ) ;
9187
9288 # Memoize nixpkgs for different platforms for efficiency.
9389 nixpkgsFor = forAllSystems (
Original file line number Diff line number Diff line change @@ -73,9 +73,7 @@ pkgs.nixComponents2.nix-util.overrideAttrs (
7373
7474 env = {
7575 # For `make format`, to work without installing pre-commit
76- _NIX_PRE_COMMIT_HOOKS_CONFIG = "${ ( pkgs . formats . yaml { } ) . generate "pre-commit-config.yaml"
77- modular . settings
78- } " ;
76+ _NIX_PRE_COMMIT_HOOKS_CONFIG = modular . shellHook ;
7977 }
8078 // lib . optionalAttrs stdenv . hostPlatform . isLinux {
8179 CC_LD = "mold" ;
Original file line number Diff line number Diff line change 4242 entry = "${ pkgs . writeScript "format-meson" ''
4343 #!${ pkgs . runtimeShell }
4444 for file in "$@"; do
45- ${ lib . getExe meson } format -ic ${ ./meson.format } "$file"
45+ ${ lib . getExe meson } format -ic ${ .. /meson.format } "$file"
4646 done
4747 '' } ";
4848 } ;
You can’t perform that action at this time.
0 commit comments