Nix: add devshell
This commit is contained in:
parent
e740e9ab01
commit
fc6ef308e2
|
@ -35,3 +35,4 @@
|
|||
.cache/
|
||||
build/
|
||||
|
||||
compile_commands.json
|
||||
|
|
12
flake.nix
12
flake.nix
|
@ -34,5 +34,17 @@
|
|||
default = self.packages.${system}.hyprsysteminfo;
|
||||
inherit (pkgsFor.${system}) hyprsysteminfo;
|
||||
});
|
||||
|
||||
devShells = eachSystem (system: {
|
||||
default = pkgsFor.${system}.mkShell {
|
||||
inputsFrom = [self.packages.${system}.hyprsysteminfo];
|
||||
|
||||
shellHook = ''
|
||||
# Generate compile_commands.json
|
||||
CMAKE_EXPORT_COMPILE_COMMANDS=1 cmake -S . -B ./build
|
||||
ln -s build/compile_commands.json .
|
||||
'';
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue