git.iko.soy/typeable/nixpkgs
on master help sign in
conky: build the docs, fixes #11461
commit43a1cfccf55b5e4cb8a38199373087d0f3c22e2e authorJan Malakhovski <oxij@oxij.org> dateFri 4 Dec 2015, 16:15 (11 years ago) parent5bd92c0
1 file changed+20
pkgs/os-specific/linux/conky/default.nix+20
pkgs/os-specific/linux/conky/default.nix+20
@@ -8,6 +8,12 @@
88, ibmSupport ? true # IBM/Lenovo notebooks
99
1010# optional features with extra dependencies
11+
12+# ouch, this is ugly, but this gives the man page
13+, docsSupport ? true, docbook2x, libxslt ? null
14+ , man ? null, less ? null
15+ , docbook_xsl ? null , docbook_xml_dtd_44 ? null
16+
1117, ncursesSupport ? true , ncurses ? null
1218, x11Support ? true , xlibsWrapper ? null
1319, xdamageSupport ? x11Support, libXdamage ? null
@@ -27,6 +33,10 @@
2733, libxml2 ? null
2834}:
2935
36+assert docsSupport -> docbook2x != null && libxslt != null
37+ && man != null && less != null
38+ && docbook_xsl != null && docbook_xml_dtd_44 != null;
39+
3040assert ncursesSupport -> ncurses != null;
3141
3242assert x11Support -> xlibsWrapper != null;
@@ -63,11 +73,20 @@ stdenv.mkDerivation rec {
6373 postPatch = ''
6474 sed -i -e '/include.*CheckIncludeFile)/i include(CheckIncludeFiles)' \
6575 cmake/ConkyPlatformChecks.cmake
76+ '' + optionalString docsSupport ''
77+ # Drop examples, since they contain non-ASCII characters that break docbook2x :(
78+ sed -i 's/ Example: .*$//' doc/config_settings.xml
79+
80+ substituteInPlace cmake/Docbook.cmake \
81+ --replace "http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl" "${docbook_xsl}/xml/xsl/docbook/html/docbook.xsl"
82+ substituteInPlace doc/docs.xml \
83+ --replace "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" "${docbook_xml_dtd_44}/xml/dtd/docbook/docbookx.dtd"
6684 '';
6785
6886 NIX_LDFLAGS = "-lgcc_s";
6987
7088 buildInputs = [ pkgconfig glib cmake ]
89+ ++ optionals docsSupport [ docbook2x libxslt man less ]
7190 ++ optional ncursesSupport ncurses
7291 ++ optional x11Support xlibsWrapper
7392 ++ optional xdamageSupport libXdamage
@@ -82,6 +101,7 @@ stdenv.mkDerivation rec {
82101 ;
83102
84103 cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ]
104+ ++ optional docsSupport "-DMAINTAINER_MODE=ON"
85105 ++ optional curlSupport "-DBUILD_CURL=ON"
86106 ++ optional (!ibmSupport) "-DBUILD_IBM=OFF"
87107 ++ optional imlib2Support "-DBUILD_IMLIB2=ON"