Skip to content

Commit

Permalink
nix: auto setup compile_commands.json via shellHook
Browse files Browse the repository at this point in the history
  • Loading branch information
horriblename committed Nov 24, 2023
1 parent adfee1e commit 09ec9ba
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
}

0 comments on commit 09ec9ba

Please sign in to comment.