From 0658554ccc46ab2830bd9a9d6fe58eb392468c46 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Tue, 29 Jan 2019 19:54:04 -0600 Subject: [PATCH] compton-git: 2 -> 5 https://github.com/yshui/compton/releases/tag/v3 https://github.com/yshui/compton/releases/tag/v4 https://github.com/yshui/compton/releases/tag/v5 Some fixes were made shortly after v5, should pick them up or wait for next release. --- .../window-managers/compton/default.nix | 50 +++++++++++++++---- 1 file changed, 40 insertions(+), 10 deletions(-) diff --git a/pkgs/applications/window-managers/compton/default.nix b/pkgs/applications/window-managers/compton/default.nix index 138451656667..a9c83e115b97 100644 --- a/pkgs/applications/window-managers/compton/default.nix +++ b/pkgs/applications/window-managers/compton/default.nix @@ -1,18 +1,14 @@ { stdenv, lib, fetchFromGitHub, pkgconfig, asciidoc, docbook_xml_dtd_45 -, docbook_xsl, libxslt, libxml2, makeWrapper +, docbook_xsl, libxslt, libxml2, makeWrapper, meson, ninja +, xorgproto, libxcb ,xcbutilrenderutil, xcbutilimage, pixman, libev , dbus, libconfig, libdrm, libGL, pcre, libX11, libXcomposite, libXdamage -, libXinerama, libXrandr, libXrender, libXext, xwininfo }: +, libXinerama, libXrandr, libXrender, libXext, xwininfo, libxdg_basedir }: let common = source: stdenv.mkDerivation (source // rec { name = "${source.pname}-${source.version}"; - buildInputs = [ - dbus libX11 libXcomposite libXdamage libXrender libXrandr libXext - libXinerama libdrm pcre libxml2 libxslt libconfig libGL - ]; - - nativeBuildInputs = [ + nativeBuildInputs = (source.nativeBuildInputs or []) ++ [ pkgconfig asciidoc docbook_xml_dtd_45 @@ -48,6 +44,11 @@ let COMPTON_VERSION = version; + buildInputs = [ + dbus libX11 libXcomposite libXdamage libXrender libXrandr libXext + libXinerama libdrm pcre libxml2 libxslt libconfig libGL + ]; + src = fetchFromGitHub { owner = "chjj"; repo = "compton"; @@ -62,17 +63,46 @@ let gitSource = rec { pname = "compton-git"; - version = "2"; + version = "5"; COMPTON_VERSION = "v${version}"; + nativeBuildInputs = [ meson ninja ]; + src = fetchFromGitHub { owner = "yshui"; repo = "compton"; rev = COMPTON_VERSION; - sha256 = "1b6jgkkjbmgm7d7qjs94h722kgbqjagcxznkh2r84hcmcl8pibjq"; + sha256 = "1x5r2dch023imgdqhgf1zxi05cc742s7xr7jzpymvl9ldqly8ppa"; }; + buildInputs = [ + dbus libX11 libXext + xorgproto + libXinerama libdrm pcre libxml2 libxslt libconfig libGL + # Removed: + # libXcomposite libXdamage libXrender libXrandr + + # New: + libxcb xcbutilrenderutil xcbutilimage + pixman libev + libxdg_basedir + ]; + + postPatch = '' + substituteInPlace meson.build \ + --replace "run_command('git', 'describe')" \ + "run_command('echo', 'v${version}')" + ''; + + NIX_CFLAGS_COMPILE = [ "-fno-strict-aliasing" ]; + + mesonFlags = [ + "-Dvsync_drm=true" + "-Dnew_backends=true" + "-Dbuild_docs=true" + ]; + meta = { homepage = https://github.com/yshui/compton/; };