mirror of
https://github.com/yshui/picom.git
synced 2024-11-11 13:51:02 -05:00
flake: update and upgrade to llvm 18
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
2dc218849d
commit
5da5a93dcc
2 changed files with 17 additions and 9 deletions
|
@ -41,11 +41,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1719397110,
|
||||
"narHash": "sha256-rYGcPSy8hBx/0OJvHrtR50KGN9AR7GN/zXG4xOi5Dnc=",
|
||||
"lastModified": 1721287717,
|
||||
"narHash": "sha256-i5F24BL4FaJCOE0twnIPaltgDNeA44CqLsj/TqBAIsQ=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c414599dfae92540ccc0c7d5d49f6cf6dc5b7fc8",
|
||||
"rev": "56375296f413158b095ce493799cc8d237d70739",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
20
flake.nix
20
flake.nix
|
@ -48,14 +48,19 @@
|
|||
(final: prev: {
|
||||
stdenv = prev.withCFlags "-fno-omit-frame-pointer" prev.stdenv;
|
||||
})
|
||||
(final: prev: {
|
||||
llvmPackages_18 = prev.llvmPackages_18 // {
|
||||
stdenv = final.withCFlags "-fno-omit-frame-pointer" prev.llvmPackages_18.stdenv;
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
overlays = [overlay];
|
||||
mkDevShell = p: p.overrideAttrs (o: {
|
||||
nativeBuildInputs = o.nativeBuildInputs ++ (with pkgs; [
|
||||
clang-tools_17
|
||||
llvmPackages_17.clang-unwrapped.python
|
||||
clang-tools_18
|
||||
llvmPackages_18.clang-unwrapped.python
|
||||
python
|
||||
]);
|
||||
hardeningDisable = ["fortify"];
|
||||
|
@ -72,15 +77,18 @@
|
|||
overlay
|
||||
overlays
|
||||
;
|
||||
defaultPackage = pkgs.picom;
|
||||
devShells.default = mkDevShell defaultPackage;
|
||||
packages = {
|
||||
default = pkgs.picom;
|
||||
llvm = profilePkgs.llvm_18;
|
||||
};
|
||||
devShells.default = mkDevShell packages.default;
|
||||
devShells.useClang = devShells.default.override {
|
||||
inherit (pkgs.llvmPackages_17) stdenv;
|
||||
inherit (pkgs.llvmPackages_18) stdenv;
|
||||
};
|
||||
# build picom and all dependencies with frame pointer, making profiling/debugging easier.
|
||||
# WARNING! many many rebuilds
|
||||
devShells.useClangProfile = (mkDevShell profilePkgs.picom).override {
|
||||
stdenv = profilePkgs.withCFlags "-fno-omit-frame-pointer" profilePkgs.llvmPackages_17.stdenv;
|
||||
stdenv = profilePkgs.withCFlags "-fno-omit-frame-pointer" profilePkgs.llvmPackages_18.stdenv;
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue