Skip to content

Commit 7a5ed1c

Browse files
committed
Fix evaluation error
1 parent 746d5c8 commit 7a5ed1c

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

flake.nix

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,12 @@
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 (

packaging/dev-shell.nix

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff 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";

packaging/pre-commit-hook-settings.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
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
};

0 commit comments

Comments
 (0)