picom: add withDebug option
This commit is contained in:
parent
33532c4756
commit
e788a4a22c
@ -27,6 +27,7 @@
|
|||||||
, xcbutilrenderutil
|
, xcbutilrenderutil
|
||||||
, xorgproto
|
, xorgproto
|
||||||
, xwininfo
|
, xwininfo
|
||||||
|
, withDebug ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
@ -72,7 +73,10 @@ stdenv.mkDerivation rec {
|
|||||||
xorgproto
|
xorgproto
|
||||||
];
|
];
|
||||||
|
|
||||||
mesonBuildType = "release";
|
# Use "debugoptimized" instead of "debug" so perhaps picom works better in
|
||||||
|
# normal usage too, not just temporary debugging.
|
||||||
|
mesonBuildType = if withDebug then "debugoptimized" else "release";
|
||||||
|
dontStrip = withDebug;
|
||||||
|
|
||||||
mesonFlags = [
|
mesonFlags = [
|
||||||
"-Dwith_docs=true"
|
"-Dwith_docs=true"
|
||||||
@ -80,9 +84,13 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
installFlags = [ "PREFIX=$(out)" ];
|
installFlags = [ "PREFIX=$(out)" ];
|
||||||
|
|
||||||
|
# In debug mode, also copy src directory to store. If you then run `gdb picom`
|
||||||
|
# in the bin directory of picom store path, gdb finds the source files.
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
wrapProgram $out/bin/picom-trans \
|
wrapProgram $out/bin/picom-trans \
|
||||||
--prefix PATH : ${lib.makeBinPath [ xwininfo ]}
|
--prefix PATH : ${lib.makeBinPath [ xwininfo ]}
|
||||||
|
'' + lib.optionalString withDebug ''
|
||||||
|
cp -r ../src $out/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
@ -93,6 +101,13 @@ stdenv.mkDerivation rec {
|
|||||||
extensions. It enables basic eye-candy effects. This fork adds
|
extensions. It enables basic eye-candy effects. This fork adds
|
||||||
additional features, such as additional effects, and a fork at a
|
additional features, such as additional effects, and a fork at a
|
||||||
well-defined and proper place.
|
well-defined and proper place.
|
||||||
|
|
||||||
|
The package can be installed in debug mode as:
|
||||||
|
|
||||||
|
picom.override { withDebug = true; }
|
||||||
|
|
||||||
|
For gdb to find the source files, you need to run gdb in the bin directory
|
||||||
|
of picom package in the nix store.
|
||||||
'';
|
'';
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
homepage = "https://github.com/yshui/picom";
|
homepage = "https://github.com/yshui/picom";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user