Merge pull request #85490 from jluttine/picom-debug
This commit is contained in:
@@ -1,41 +1,82 @@
|
|||||||
{ stdenv, lib, fetchFromGitHub, pkg-config, uthash, asciidoc, docbook_xml_dtd_45
|
{ asciidoc
|
||||||
, docbook_xsl, libxslt, libxml2, makeWrapper, meson, ninja
|
, dbus
|
||||||
, xorgproto, libxcb ,xcbutilrenderutil, xcbutilimage, pixman, libev
|
, docbook_xml_dtd_45
|
||||||
, dbus, libconfig, libdrm, libGL, pcre, libX11
|
, docbook_xsl
|
||||||
, libXinerama, libXext, xwininfo, libxdg_basedir }:
|
, 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 {
|
stdenv.mkDerivation rec {
|
||||||
pname = "picom";
|
pname = "picom";
|
||||||
version = "8.2";
|
version = "8.2";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "yshui";
|
owner = "yshui";
|
||||||
repo = "picom";
|
repo = "picom";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "0gjksayz2xpmgglvw17ppsan2imrd1fijs579kbf27xwp503xgfl";
|
sha256 = "0gjksayz2xpmgglvw17ppsan2imrd1fijs579kbf27xwp503xgfl";
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
meson ninja
|
|
||||||
pkg-config
|
|
||||||
uthash
|
|
||||||
asciidoc
|
asciidoc
|
||||||
docbook_xml_dtd_45
|
docbook_xml_dtd_45
|
||||||
docbook_xsl
|
docbook_xsl
|
||||||
makeWrapper
|
makeWrapper
|
||||||
|
meson
|
||||||
|
ninja
|
||||||
|
pkg-config
|
||||||
|
uthash
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
dbus libX11 libXext
|
dbus
|
||||||
xorgproto
|
libconfig
|
||||||
libXinerama libdrm pcre libxml2 libxslt libconfig libGL
|
libdrm
|
||||||
libxcb xcbutilrenderutil xcbutilimage
|
libev
|
||||||
pixman libev
|
libGL
|
||||||
|
libX11
|
||||||
|
libxcb
|
||||||
libxdg_basedir
|
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 = [
|
mesonFlags = [
|
||||||
"-Dwith_docs=true"
|
"-Dwith_docs=true"
|
||||||
@@ -43,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; {
|
||||||
@@ -56,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";
|
||||||
|
|||||||
Reference in New Issue
Block a user