mirror of
https://github.com/hyprwm/hyprsysteminfo.git
synced 2024-11-21 22:55:58 +01:00
Nix: add devshell
This commit is contained in:
parent
e740e9ab01
commit
fc6ef308e2
3 changed files with 14 additions and 0 deletions
1
.envrc
Normal file
1
.envrc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
use flake
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -35,3 +35,4 @@
|
||||||
.cache/
|
.cache/
|
||||||
build/
|
build/
|
||||||
|
|
||||||
|
compile_commands.json
|
||||||
|
|
12
flake.nix
12
flake.nix
|
@ -34,5 +34,17 @@
|
||||||
default = self.packages.${system}.hyprsysteminfo;
|
default = self.packages.${system}.hyprsysteminfo;
|
||||||
inherit (pkgsFor.${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 a new issue