From 09ec9baff6f4e2079352595c0282753a940f914b Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Fri, 24 Nov 2023 16:02:43 +0100 Subject: [PATCH] nix: auto setup compile_commands.json via shellHook --- flake.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index d734b1e..1c9741b 100644 --- a/flake.nix +++ b/flake.nix @@ -23,16 +23,20 @@ devShells = withPkgsFor (system: pkgs: { default = pkgs.mkShell { + shellHook = '' + meson setup build --reconfigure -D tests=true + sed -e 's/c++23/c++2b/g' ./build/compile_commands.json > ./compile_commands.json + ''; name = "hyprgrass-shell"; - nativeBuildInputs = with pkgs; [cpplint]; + nativeBuildInputs = with pkgs; [gcc13]; buildInputs = [hyprland.packages.${system}.hyprland]; inputsFrom = [ hyprland.packages.${system}.hyprland - (self.packages.${system}.default) + self.packages.${system}.default ]; }; }); - formatter = withPkgsFor (system: pkgs: pkgs.alejandra); + formatter = withPkgsFor (_system: pkgs: pkgs.alejandra); }; }