diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2021-01-25 17:14:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-25 17:14:43 +0100 |
commit | ff8311492284626bdf788944f7760194b7dae457 (patch) | |
tree | e0d2b557e51e6f074356f5efde745429a2751d7a /pkgs/applications/window-managers | |
parent | ff7ba7a2dce6b4341981ec9e4676cd8e3ba069f1 (diff) | |
parent | e788a4a22ce6c7d29c4c9bf3d5595287cdab7e59 (diff) |
Merge pull request #85490 from jluttine/picom-debug
Diffstat (limited to 'pkgs/applications/window-managers')
-rw-r--r-- | pkgs/applications/window-managers/picom/default.nix | 86 |
1 files changed, 69 insertions, 17 deletions
diff --git a/pkgs/applications/window-managers/picom/default.nix b/pkgs/applications/window-managers/picom/default.nix index 4287dd2db020..32eee9df0d83 100644 --- a/pkgs/applications/window-managers/picom/default.nix +++ b/pkgs/applications/window-managers/picom/default.nix @@ -1,41 +1,82 @@ -{ stdenv, lib, fetchFromGitHub, pkg-config, uthash, asciidoc, docbook_xml_dtd_45 -, docbook_xsl, libxslt, libxml2, makeWrapper, meson, ninja -, xorgproto, libxcb ,xcbutilrenderutil, xcbutilimage, pixman, libev -, dbus, libconfig, libdrm, libGL, pcre, libX11 -, libXinerama, libXext, xwininfo, libxdg_basedir }: +{ asciidoc +, dbus +, docbook_xml_dtd_45 +, docbook_xsl +, fetchFromGitHub +, lib +, libconfig +, libdrm +, libev +, libGL +, libX11 +, libxcb +, libxdg_basedir +, libXext +, libXinerama +, libxml2 +, libxslt +, makeWrapper +, meson +, ninja +, pcre +, pixman +, pkg-config +, stdenv +, uthash +, xcbutilimage +, xcbutilrenderutil +, xorgproto +, xwininfo +, withDebug ? false +}: stdenv.mkDerivation rec { pname = "picom"; version = "8.2"; src = fetchFromGitHub { - owner = "yshui"; - repo = "picom"; - rev = "v${version}"; + owner = "yshui"; + repo = "picom"; + rev = "v${version}"; sha256 = "0gjksayz2xpmgglvw17ppsan2imrd1fijs579kbf27xwp503xgfl"; fetchSubmodules = true; }; nativeBuildInputs = [ - meson ninja - pkg-config - uthash asciidoc docbook_xml_dtd_45 docbook_xsl makeWrapper + meson + ninja + pkg-config + uthash ]; buildInputs = [ - dbus libX11 libXext - xorgproto - libXinerama libdrm pcre libxml2 libxslt libconfig libGL - libxcb xcbutilrenderutil xcbutilimage - pixman libev + dbus + libconfig + libdrm + libev + libGL + libX11 + libxcb libxdg_basedir + libXext + libXinerama + libxml2 + libxslt + pcre + pixman + xcbutilimage + xcbutilrenderutil + 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 = [ "-Dwith_docs=true" @@ -43,9 +84,13 @@ stdenv.mkDerivation rec { 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 = '' wrapProgram $out/bin/picom-trans \ --prefix PATH : ${lib.makeBinPath [ xwininfo ]} + '' + lib.optionalString withDebug '' + cp -r ../src $out/ ''; meta = with lib; { @@ -56,6 +101,13 @@ stdenv.mkDerivation rec { extensions. It enables basic eye-candy effects. This fork adds additional features, such as additional effects, and a fork at a 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; homepage = "https://github.com/yshui/picom"; |