1
0
Fork 0
mirror of https://github.com/yshui/picom.git synced 2024-11-25 14:06:08 -05:00

flake: some improvements

Development tools should be nativeBuildInputs. Also added a clang
version of the dev shell.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2024-02-18 23:13:53 +00:00
parent bef295f4c4
commit 336943d99c
No known key found for this signature in database
GPG key ID: D3A4405BE6CC17F4

View file

@ -43,19 +43,20 @@
overlays
;
defaultPackage = pkgs.picom;
devShell = defaultPackage.overrideAttrs {
buildInputs =
defaultPackage.buildInputs
++ (with pkgs; [
clang-tools_17
llvmPackages_17.clang-unwrapped.python
]);
devShells.default = defaultPackage.overrideAttrs (o: {
nativeBuildInputs = o.nativeBuildInputs ++ (with pkgs; [
clang-tools_17
llvmPackages_17.clang-unwrapped.python
]);
hardeningDisable = ["fortify"];
shellHook = ''
# Workaround a NixOS limitation on sanitizers:
# See: https://github.com/NixOS/nixpkgs/issues/287763
export LD_LIBRARY_PATH+=":/run/opengl-driver/lib"
'';
});
devShells.useClang = devShells.default.override {
inherit (pkgs.llvmPackages_17) stdenv;
};
});
}