diff options
author | David Guibert <david.guibert@gmail.com> | 2024-03-10 21:41:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-10 21:41:37 +0100 |
commit | 0d0289f698fd911f76d1972fa6d8229b50c8cd2d (patch) | |
tree | ba6dde0c224247c47475c28a0fc060ed01b7e304 /pkgs/os-specific | |
parent | c2e4139f043eb5d1f0f679288ec965fe1c0688cf (diff) | |
parent | ac80e19d8c1a117d653173ebd87aff9b150639b5 (diff) |
Merge pull request #278071 from uninsane/pr-conky-wayland-cross
conky: enable Wayland support and cross compilation
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r-- | pkgs/os-specific/linux/conky/default.nix | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/pkgs/os-specific/linux/conky/default.nix b/pkgs/os-specific/linux/conky/default.nix index ab55839c34080..32eef7f9e26a7 100644 --- a/pkgs/os-specific/linux/conky/default.nix +++ b/pkgs/os-specific/linux/conky/default.nix @@ -16,13 +16,14 @@ , ncursesSupport ? true , ncurses ? null , x11Support ? true , freetype, xorg +, waylandSupport ? true , pango, wayland, wayland-protocols, wayland-scanner , xdamageSupport ? x11Support, libXdamage ? null , doubleBufferSupport ? x11Support , imlib2Support ? x11Support, imlib2 ? null , luaSupport ? true , lua ? null , luaImlib2Support ? luaSupport && imlib2Support -, luaCairoSupport ? luaSupport && x11Support, cairo ? null +, luaCairoSupport ? luaSupport && (x11Support || waylandSupport), cairo ? null , toluapp ? null , wirelessSupport ? true , wirelesstools ? null @@ -76,13 +77,13 @@ stdenv.mkDerivation rec { hash = "sha256-L8YSbdk+qQl17L4IRajFD/AEWRXb2w7xH9sM9qPGrQo="; }; - postPatch = '' - sed -i -e '/include.*CheckIncludeFile)/i include(CheckIncludeFiles)' \ - cmake/ConkyPlatformChecks.cmake - '' + optionalString docsSupport '' + postPatch = optionalString docsSupport '' substituteInPlace cmake/Conky.cmake --replace "# set(RELEASE true)" "set(RELEASE true)" cp ${catch2}/include/catch2/catch.hpp tests/catch2/catch.hpp + '' + optionalString waylandSupport '' + substituteInPlace src/CMakeLists.txt \ + --replace 'COMMAND ''${Wayland_SCANNER}' 'COMMAND wayland-scanner' ''; env = { @@ -91,16 +92,21 @@ stdenv.mkDerivation rec { NIX_LDFLAGS = "-lgcc_s"; }; - nativeBuildInputs = [ cmake pkg-config ]; - buildInputs = [ glib libXinerama ] + nativeBuildInputs = [ cmake pkg-config ] ++ optionals docsSupport [ docbook2x docbook_xsl docbook_xml_dtd_44 libxslt man less ] + ++ optional waylandSupport wayland-scanner + ++ optional luaImlib2Support toluapp + ++ optional luaCairoSupport toluapp + ; + buildInputs = [ glib libXinerama ] ++ optional ncursesSupport ncurses ++ optionals x11Support [ freetype xorg.libICE xorg.libX11 xorg.libXext xorg.libXft xorg.libSM ] + ++ optionals waylandSupport [ pango wayland wayland-protocols ] ++ optional xdamageSupport libXdamage ++ optional imlib2Support imlib2 ++ optional luaSupport lua - ++ optionals luaImlib2Support [ toluapp imlib2 ] - ++ optionals luaCairoSupport [ toluapp cairo ] + ++ optional luaImlib2Support imlib2 + ++ optional luaCairoSupport cairo ++ optional wirelessSupport wirelesstools ++ optional curlSupport curl ++ optional rssSupport libxml2 @@ -121,6 +127,7 @@ stdenv.mkDerivation rec { ++ optional (!ncursesSupport) "-DBUILD_NCURSES=OFF" ++ optional rssSupport "-DBUILD_RSS=ON" ++ optional (!x11Support) "-DBUILD_X11=OFF" + ++ optional waylandSupport "-DBUILD_WAYLAND=ON" ++ optional xdamageSupport "-DBUILD_XDAMAGE=ON" ++ optional doubleBufferSupport "-DBUILD_XDBE=ON" ++ optional weatherMetarSupport "-DBUILD_WEATHER_METAR=ON" |