2020-04-17 16:14:37 +00:00
|
|
|
{ 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
|
2020-04-17 16:16:19 +00:00
|
|
|
, withDebug ? false
|
2020-04-17 16:14:37 +00:00
|
|
|
}:
|
2019-12-02 12:43:48 +00:00
|
|
|
|
2019-05-28 11:37:14 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-12-02 12:43:48 +00:00
|
|
|
pname = "picom";
|
2022-02-14 03:45:58 +00:00
|
|
|
version = "9.1";
|
2018-08-29 02:47:35 +00:00
|
|
|
|
2019-05-28 11:37:14 +00:00
|
|
|
src = fetchFromGitHub {
|
2020-04-17 16:14:37 +00:00
|
|
|
owner = "yshui";
|
|
|
|
repo = "picom";
|
|
|
|
rev = "v${version}";
|
2022-02-14 03:45:58 +00:00
|
|
|
sha256 = "sha256-Fqk6bPAOg4muxmSP+ezpGUNw6xrMWchZACKemeA08mA=";
|
2019-07-19 13:48:28 +00:00
|
|
|
fetchSubmodules = true;
|
2018-08-29 02:47:35 +00:00
|
|
|
};
|
|
|
|
|
2019-05-28 11:37:14 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
asciidoc
|
|
|
|
docbook_xml_dtd_45
|
|
|
|
docbook_xsl
|
|
|
|
makeWrapper
|
2020-04-17 16:14:37 +00:00
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
uthash
|
2019-05-28 11:37:14 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2020-04-17 16:14:37 +00:00
|
|
|
dbus
|
|
|
|
libconfig
|
|
|
|
libdrm
|
|
|
|
libev
|
|
|
|
libGL
|
|
|
|
libX11
|
|
|
|
libxcb
|
2019-05-28 11:37:14 +00:00
|
|
|
libxdg_basedir
|
2020-04-17 16:14:37 +00:00
|
|
|
libXext
|
|
|
|
libXinerama
|
|
|
|
libxml2
|
|
|
|
libxslt
|
|
|
|
pcre
|
|
|
|
pixman
|
|
|
|
xcbutilimage
|
|
|
|
xcbutilrenderutil
|
|
|
|
xorgproto
|
2019-05-28 11:37:14 +00:00
|
|
|
];
|
|
|
|
|
2020-04-17 16:16:19 +00:00
|
|
|
# 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;
|
2019-05-28 11:37:14 +00:00
|
|
|
|
|
|
|
mesonFlags = [
|
2021-01-05 23:42:48 +00:00
|
|
|
"-Dwith_docs=true"
|
2019-05-28 11:37:14 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
installFlags = [ "PREFIX=$(out)" ];
|
|
|
|
|
2020-04-17 16:16:19 +00:00
|
|
|
# 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.
|
2019-05-28 11:37:14 +00:00
|
|
|
postInstall = ''
|
2019-12-02 12:43:48 +00:00
|
|
|
wrapProgram $out/bin/picom-trans \
|
2019-05-28 11:37:14 +00:00
|
|
|
--prefix PATH : ${lib.makeBinPath [ xwininfo ]}
|
2020-04-17 16:16:19 +00:00
|
|
|
'' + lib.optionalString withDebug ''
|
|
|
|
cp -r ../src $out/
|
2019-05-28 11:37:14 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A fork of XCompMgr, a sample compositing manager for X servers";
|
|
|
|
longDescription = ''
|
|
|
|
A fork of XCompMgr, which is a sample compositing manager for X
|
|
|
|
servers supporting the XFIXES, DAMAGE, RENDER, and COMPOSITE
|
|
|
|
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.
|
2020-04-17 16:16:19 +00:00
|
|
|
|
|
|
|
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.
|
2019-01-30 01:54:04 +00:00
|
|
|
'';
|
2019-05-28 11:37:14 +00:00
|
|
|
license = licenses.mit;
|
2019-12-02 12:43:48 +00:00
|
|
|
homepage = "https://github.com/yshui/picom";
|
2021-01-06 22:20:05 +00:00
|
|
|
maintainers = with maintainers; [ ertes twey thiagokokada ];
|
2019-05-28 11:37:14 +00:00
|
|
|
platforms = platforms.linux;
|
2012-06-08 10:16:46 +00:00
|
|
|
};
|
|
|
|
}
|