mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 22:43:01 +00:00
conky: remove 'with lib;'
This commit is contained in:
parent
a41905ddf9
commit
95cf21bab2
@ -3,11 +3,11 @@
|
||||
# dependencies
|
||||
, glib, libXinerama, catch2
|
||||
|
||||
# optional features without extra dependencies
|
||||
# lib.optional features without extra dependencies
|
||||
, mpdSupport ? true
|
||||
, ibmSupport ? true # IBM/Lenovo notebooks
|
||||
|
||||
# optional features with extra dependencies
|
||||
# lib.optional features with extra dependencies
|
||||
|
||||
# ouch, this is ugly, but this gives the man page
|
||||
, docsSupport ? true, docbook2x, libxslt ? null
|
||||
@ -64,8 +64,6 @@ assert weatherMetarSupport -> curlSupport;
|
||||
assert weatherXoapSupport -> curlSupport && libxml2 != null;
|
||||
assert journalSupport -> systemd != null;
|
||||
|
||||
with lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "conky";
|
||||
version = "1.19.6";
|
||||
@ -77,11 +75,11 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha256-L8YSbdk+qQl17L4IRajFD/AEWRXb2w7xH9sM9qPGrQo=";
|
||||
};
|
||||
|
||||
postPatch = optionalString docsSupport ''
|
||||
postPatch = lib.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 ''
|
||||
'' + lib.optionalString waylandSupport ''
|
||||
substituteInPlace src/CMakeLists.txt \
|
||||
--replace 'COMMAND ''${Wayland_SCANNER}' 'COMMAND wayland-scanner'
|
||||
'';
|
||||
@ -93,49 +91,49 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
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
|
||||
++ lib.optionals docsSupport [ docbook2x docbook_xsl docbook_xml_dtd_44 libxslt man less ]
|
||||
++ lib.optional waylandSupport wayland-scanner
|
||||
++ lib.optional luaImlib2Support toluapp
|
||||
++ lib.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
|
||||
++ optional luaImlib2Support imlib2
|
||||
++ optional luaCairoSupport cairo
|
||||
++ optional wirelessSupport wirelesstools
|
||||
++ optional curlSupport curl
|
||||
++ optional rssSupport libxml2
|
||||
++ optional weatherXoapSupport libxml2
|
||||
++ optional nvidiaSupport libXNVCtrl
|
||||
++ optional pulseSupport libpulseaudio
|
||||
++ optional journalSupport systemd
|
||||
++ lib.optional ncursesSupport ncurses
|
||||
++ lib.optionals x11Support [ freetype xorg.libICE xorg.libX11 xorg.libXext xorg.libXft xorg.libSM ]
|
||||
++ lib.optionals waylandSupport [ pango wayland wayland-protocols ]
|
||||
++ lib.optional xdamageSupport libXdamage
|
||||
++ lib.optional imlib2Support imlib2
|
||||
++ lib.optional luaSupport lua
|
||||
++ lib.optional luaImlib2Support imlib2
|
||||
++ lib.optional luaCairoSupport cairo
|
||||
++ lib.optional wirelessSupport wirelesstools
|
||||
++ lib.optional curlSupport curl
|
||||
++ lib.optional rssSupport libxml2
|
||||
++ lib.optional weatherXoapSupport libxml2
|
||||
++ lib.optional nvidiaSupport libXNVCtrl
|
||||
++ lib.optional pulseSupport libpulseaudio
|
||||
++ lib.optional journalSupport systemd
|
||||
;
|
||||
|
||||
cmakeFlags = []
|
||||
++ optional docsSupport "-DMAINTAINER_MODE=ON"
|
||||
++ optional curlSupport "-DBUILD_CURL=ON"
|
||||
++ optional (!ibmSupport) "-DBUILD_IBM=OFF"
|
||||
++ optional imlib2Support "-DBUILD_IMLIB2=ON"
|
||||
++ optional luaCairoSupport "-DBUILD_LUA_CAIRO=ON"
|
||||
++ optional luaImlib2Support "-DBUILD_LUA_IMLIB2=ON"
|
||||
++ optional (!mpdSupport) "-DBUILD_MPD=OFF"
|
||||
++ 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"
|
||||
++ optional weatherXoapSupport "-DBUILD_WEATHER_XOAP=ON"
|
||||
++ optional wirelessSupport "-DBUILD_WLAN=ON"
|
||||
++ optional nvidiaSupport "-DBUILD_NVIDIA=ON"
|
||||
++ optional pulseSupport "-DBUILD_PULSEAUDIO=ON"
|
||||
++ optional journalSupport "-DBUILD_JOURNAL=ON"
|
||||
++ lib.optional docsSupport "-DMAINTAINER_MODE=ON"
|
||||
++ lib.optional curlSupport "-DBUILD_CURL=ON"
|
||||
++ lib.optional (!ibmSupport) "-DBUILD_IBM=OFF"
|
||||
++ lib.optional imlib2Support "-DBUILD_IMLIB2=ON"
|
||||
++ lib.optional luaCairoSupport "-DBUILD_LUA_CAIRO=ON"
|
||||
++ lib.optional luaImlib2Support "-DBUILD_LUA_IMLIB2=ON"
|
||||
++ lib.optional (!mpdSupport) "-DBUILD_MPD=OFF"
|
||||
++ lib.optional (!ncursesSupport) "-DBUILD_NCURSES=OFF"
|
||||
++ lib.optional rssSupport "-DBUILD_RSS=ON"
|
||||
++ lib.optional (!x11Support) "-DBUILD_X11=OFF"
|
||||
++ lib.optional waylandSupport "-DBUILD_WAYLAND=ON"
|
||||
++ lib.optional xdamageSupport "-DBUILD_XDAMAGE=ON"
|
||||
++ lib.optional doubleBufferSupport "-DBUILD_XDBE=ON"
|
||||
++ lib.optional weatherMetarSupport "-DBUILD_WEATHER_METAR=ON"
|
||||
++ lib.optional weatherXoapSupport "-DBUILD_WEATHER_XOAP=ON"
|
||||
++ lib.optional wirelessSupport "-DBUILD_WLAN=ON"
|
||||
++ lib.optional nvidiaSupport "-DBUILD_NVIDIA=ON"
|
||||
++ lib.optional pulseSupport "-DBUILD_PULSEAUDIO=ON"
|
||||
++ lib.optional journalSupport "-DBUILD_JOURNAL=ON"
|
||||
;
|
||||
|
||||
# `make -f src/CMakeFiles/conky.dir/build.make src/CMakeFiles/conky.dir/conky.cc.o`:
|
||||
|
Loading…
Reference in New Issue
Block a user