2016-02-18 06:07:23 +00:00
|
|
|
{ stdenv, fetchurl, ncurses, openssl, aspell, gnutls
|
|
|
|
, zlib, curl , pkgconfig, libgcrypt
|
2016-10-20 13:28:27 +01:00
|
|
|
, cmake, makeWrapper, libobjc, libresolv, libiconv
|
2016-10-14 22:30:38 +01:00
|
|
|
, asciidoctor # manpages
|
2016-02-18 06:07:23 +00:00
|
|
|
, guileSupport ? true, guile
|
|
|
|
, luaSupport ? true, lua5
|
|
|
|
, perlSupport ? true, perl
|
|
|
|
, pythonPackages
|
|
|
|
, rubySupport ? true, ruby
|
|
|
|
, tclSupport ? true, tcl
|
2015-02-28 01:34:18 +00:00
|
|
|
, extraBuildInputs ? [] }:
|
2010-08-05 16:47:15 +01:00
|
|
|
|
2016-02-18 06:07:23 +00:00
|
|
|
assert guileSupport -> guile != null;
|
|
|
|
assert luaSupport -> lua5 != null;
|
|
|
|
assert perlSupport -> perl != null;
|
|
|
|
assert rubySupport -> ruby != null;
|
|
|
|
assert tclSupport -> tcl != null;
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (pythonPackages) python pycrypto pync;
|
|
|
|
in
|
|
|
|
|
2012-06-01 23:04:08 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2017-09-28 12:00:59 +01:00
|
|
|
version = "1.9.1";
|
2012-06-01 23:04:08 +01:00
|
|
|
name = "weechat-${version}";
|
2010-08-05 16:47:15 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-06-07 14:21:00 +01:00
|
|
|
url = "http://weechat.org/files/src/weechat-${version}.tar.bz2";
|
2017-09-28 12:00:59 +01:00
|
|
|
sha256 = "1kgi079bq4n0wb7hc7mz8p7ay1b2m0a4wpvb92sfsxrnh10qr5m1";
|
2010-08-05 16:47:15 +01:00
|
|
|
};
|
|
|
|
|
2017-07-11 10:14:14 +01:00
|
|
|
outputs = [ "out" "man" ];
|
2016-10-14 22:30:38 +01:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
cmakeFlags = with stdenv.lib; [
|
|
|
|
"-DENABLE_MAN=ON"
|
|
|
|
"-DENABLE_DOC=ON"
|
|
|
|
]
|
2016-09-07 00:59:16 +01:00
|
|
|
++ optionals stdenv.isDarwin ["-DICONV_LIBRARY=${libiconv}/lib/libiconv.dylib" "-DCMAKE_FIND_FRAMEWORK=LAST"]
|
2016-02-18 06:07:23 +00:00
|
|
|
++ optional (!guileSupport) "-DENABLE_GUILE=OFF"
|
|
|
|
++ optional (!luaSupport) "-DENABLE_LUA=OFF"
|
|
|
|
++ optional (!perlSupport) "-DENABLE_PERL=OFF"
|
|
|
|
++ optional (!rubySupport) "-DENABLE_RUBY=OFF"
|
|
|
|
++ optional (!tclSupport) "-DENABLE_TCL=OFF"
|
|
|
|
;
|
2015-08-21 22:02:39 +01:00
|
|
|
|
2016-02-18 06:07:23 +00:00
|
|
|
buildInputs = with stdenv.lib; [
|
|
|
|
ncurses python openssl aspell gnutls zlib curl pkgconfig
|
|
|
|
libgcrypt pycrypto makeWrapper
|
|
|
|
cmake
|
2016-10-14 22:30:38 +01:00
|
|
|
asciidoctor
|
|
|
|
]
|
2016-10-20 13:28:27 +01:00
|
|
|
++ optionals stdenv.isDarwin [ pync libobjc libresolv ]
|
2016-02-18 06:07:23 +00:00
|
|
|
++ optional guileSupport guile
|
|
|
|
++ optional luaSupport lua5
|
|
|
|
++ optional perlSupport perl
|
|
|
|
++ optional rubySupport ruby
|
|
|
|
++ optional tclSupport tcl
|
2015-02-28 01:34:18 +00:00
|
|
|
++ extraBuildInputs;
|
2010-08-05 16:47:15 +01:00
|
|
|
|
2016-10-03 18:22:08 +01:00
|
|
|
NIX_CFLAGS_COMPILE = "-I${python}/include/${python.libPrefix}"
|
|
|
|
# Fix '_res_9_init: undefined symbol' error
|
2016-10-20 13:28:27 +01:00
|
|
|
+ (stdenv.lib.optionalString stdenv.isDarwin "-DBIND_8_COMPAT=1 -lresolv");
|
2014-05-14 02:31:43 +01:00
|
|
|
|
2016-08-19 13:48:07 +01:00
|
|
|
postInstall = with stdenv.lib; ''
|
2014-05-14 05:46:39 +01:00
|
|
|
NIX_PYTHONPATH="$out/lib/${python.libPrefix}/site-packages"
|
2015-02-28 01:34:18 +00:00
|
|
|
wrapProgram "$out/bin/weechat" \
|
2016-08-19 13:48:07 +01:00
|
|
|
${optionalString perlSupport "--prefix PATH : ${perl}/bin"} \
|
|
|
|
--prefix PATH : ${pythonPackages.python}/bin \
|
2015-02-28 01:34:18 +00:00
|
|
|
--prefix PYTHONPATH : "$PYTHONPATH" \
|
|
|
|
--prefix PYTHONPATH : "$NIX_PYTHONPATH"
|
2012-12-28 01:17:04 +00:00
|
|
|
'';
|
|
|
|
|
2010-08-05 16:47:15 +01:00
|
|
|
meta = {
|
2013-10-07 12:24:54 +01:00
|
|
|
homepage = http://www.weechat.org/;
|
2010-08-05 16:47:15 +01:00
|
|
|
description = "A fast, light and extensible chat client";
|
2012-06-01 23:04:08 +01:00
|
|
|
license = stdenv.lib.licenses.gpl3;
|
2014-05-14 02:31:43 +01:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ lovek323 garbas the-kenny ];
|
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2010-08-05 16:47:15 +01:00
|
|
|
};
|
|
|
|
}
|