···2727, xcbutilrenderutil
2828, xorgproto
2929, xwininfo
3030+, withDebug ? false
3031}:
31323233stdenv.mkDerivation rec {
···7273 xorgproto
7374 ];
74757575- mesonBuildType = "release";
7676+ # Use "debugoptimized" instead of "debug" so perhaps picom works better in
7777+ # normal usage too, not just temporary debugging.
7878+ mesonBuildType = if withDebug then "debugoptimized" else "release";
7979+ dontStrip = withDebug;
76807781 mesonFlags = [
7882 "-Dwith_docs=true"
···80848185 installFlags = [ "PREFIX=$(out)" ];
82868787+ # In debug mode, also copy src directory to store. If you then run `gdb picom`
8888+ # in the bin directory of picom store path, gdb finds the source files.
8389 postInstall = ''
8490 wrapProgram $out/bin/picom-trans \
8591 --prefix PATH : ${lib.makeBinPath [ xwininfo ]}
9292+ '' + lib.optionalString withDebug ''
9393+ cp -r ../src $out/
8694 '';
87958896 meta = with lib; {
···93101 extensions. It enables basic eye-candy effects. This fork adds
94102 additional features, such as additional effects, and a fork at a
95103 well-defined and proper place.
104104+105105+ The package can be installed in debug mode as:
106106+107107+ picom.override { withDebug = true; }
108108+109109+ For gdb to find the source files, you need to run gdb in the bin directory
110110+ of picom package in the nix store.
96111 '';
97112 license = licenses.mit;
98113 homepage = "https://github.com/yshui/picom";