Merge pull request #85490 from jluttine/picom-debug

authored by Sandro and committed by GitHub ff831149 ff7ba7a2

+69 -17
+69 -17
pkgs/applications/window-managers/picom/default.nix
··· 1 - { stdenv, lib, fetchFromGitHub, pkg-config, uthash, asciidoc, docbook_xml_dtd_45 2 - , docbook_xsl, libxslt, libxml2, makeWrapper, meson, ninja 3 - , xorgproto, libxcb ,xcbutilrenderutil, xcbutilimage, pixman, libev 4 - , dbus, libconfig, libdrm, libGL, pcre, libX11 5 - , libXinerama, libXext, xwininfo, libxdg_basedir }: 6 7 stdenv.mkDerivation rec { 8 pname = "picom"; 9 version = "8.2"; 10 11 src = fetchFromGitHub { 12 - owner = "yshui"; 13 - repo = "picom"; 14 - rev = "v${version}"; 15 sha256 = "0gjksayz2xpmgglvw17ppsan2imrd1fijs579kbf27xwp503xgfl"; 16 fetchSubmodules = true; 17 }; 18 19 nativeBuildInputs = [ 20 - meson ninja 21 - pkg-config 22 - uthash 23 asciidoc 24 docbook_xml_dtd_45 25 docbook_xsl 26 makeWrapper 27 ]; 28 29 buildInputs = [ 30 - dbus libX11 libXext 31 xorgproto 32 - libXinerama libdrm pcre libxml2 libxslt libconfig libGL 33 - libxcb xcbutilrenderutil xcbutilimage 34 - pixman libev 35 - libxdg_basedir 36 ]; 37 38 - mesonBuildType = "release"; 39 40 mesonFlags = [ 41 "-Dwith_docs=true" ··· 43 44 installFlags = [ "PREFIX=$(out)" ]; 45 46 postInstall = '' 47 wrapProgram $out/bin/picom-trans \ 48 --prefix PATH : ${lib.makeBinPath [ xwininfo ]} 49 ''; 50 51 meta = with lib; { ··· 56 extensions. It enables basic eye-candy effects. This fork adds 57 additional features, such as additional effects, and a fork at a 58 well-defined and proper place. 59 ''; 60 license = licenses.mit; 61 homepage = "https://github.com/yshui/picom";
··· 1 + { asciidoc 2 + , dbus 3 + , docbook_xml_dtd_45 4 + , docbook_xsl 5 + , fetchFromGitHub 6 + , lib 7 + , libconfig 8 + , libdrm 9 + , libev 10 + , libGL 11 + , libX11 12 + , libxcb 13 + , libxdg_basedir 14 + , libXext 15 + , libXinerama 16 + , libxml2 17 + , libxslt 18 + , makeWrapper 19 + , meson 20 + , ninja 21 + , pcre 22 + , pixman 23 + , pkg-config 24 + , stdenv 25 + , uthash 26 + , xcbutilimage 27 + , xcbutilrenderutil 28 + , xorgproto 29 + , xwininfo 30 + , withDebug ? false 31 + }: 32 33 stdenv.mkDerivation rec { 34 pname = "picom"; 35 version = "8.2"; 36 37 src = fetchFromGitHub { 38 + owner = "yshui"; 39 + repo = "picom"; 40 + rev = "v${version}"; 41 sha256 = "0gjksayz2xpmgglvw17ppsan2imrd1fijs579kbf27xwp503xgfl"; 42 fetchSubmodules = true; 43 }; 44 45 nativeBuildInputs = [ 46 asciidoc 47 docbook_xml_dtd_45 48 docbook_xsl 49 makeWrapper 50 + meson 51 + ninja 52 + pkg-config 53 + uthash 54 ]; 55 56 buildInputs = [ 57 + dbus 58 + libconfig 59 + libdrm 60 + libev 61 + libGL 62 + libX11 63 + libxcb 64 + libxdg_basedir 65 + libXext 66 + libXinerama 67 + libxml2 68 + libxslt 69 + pcre 70 + pixman 71 + xcbutilimage 72 + xcbutilrenderutil 73 xorgproto 74 ]; 75 76 + # Use "debugoptimized" instead of "debug" so perhaps picom works better in 77 + # normal usage too, not just temporary debugging. 78 + mesonBuildType = if withDebug then "debugoptimized" else "release"; 79 + dontStrip = withDebug; 80 81 mesonFlags = [ 82 "-Dwith_docs=true" ··· 84 85 installFlags = [ "PREFIX=$(out)" ]; 86 87 + # In debug mode, also copy src directory to store. If you then run `gdb picom` 88 + # in the bin directory of picom store path, gdb finds the source files. 89 postInstall = '' 90 wrapProgram $out/bin/picom-trans \ 91 --prefix PATH : ${lib.makeBinPath [ xwininfo ]} 92 + '' + lib.optionalString withDebug '' 93 + cp -r ../src $out/ 94 ''; 95 96 meta = with lib; { ··· 101 extensions. It enables basic eye-candy effects. This fork adds 102 additional features, such as additional effects, and a fork at a 103 well-defined and proper place. 104 + 105 + The package can be installed in debug mode as: 106 + 107 + picom.override { withDebug = true; } 108 + 109 + For gdb to find the source files, you need to run gdb in the bin directory 110 + of picom package in the nix store. 111 ''; 112 license = licenses.mit; 113 homepage = "https://github.com/yshui/picom";