2016-02-18 07:07:23 +01:00
|
|
|
{ stdenv, fetchurl, ncurses, openssl, aspell, gnutls
|
|
|
|
, zlib, curl , pkgconfig, libgcrypt
|
|
|
|
, cmake, makeWrapper, libobjc, libiconv
|
|
|
|
, guileSupport ? true, guile
|
|
|
|
, luaSupport ? true, lua5
|
|
|
|
, perlSupport ? true, perl
|
|
|
|
, pythonPackages
|
|
|
|
, rubySupport ? true, ruby
|
|
|
|
, tclSupport ? true, tcl
|
2015-02-28 02:34:18 +01:00
|
|
|
, extraBuildInputs ? [] }:
|
2010-08-05 17:47:15 +02:00
|
|
|
|
2016-02-18 07:07:23 +01: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-02 00:04:08 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2016-01-21 08:20:39 +01:00
|
|
|
version = "1.4";
|
2012-06-02 00:04:08 +02:00
|
|
|
name = "weechat-${version}";
|
2010-08-05 17:47:15 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-06-07 15:21:00 +02:00
|
|
|
url = "http://weechat.org/files/src/weechat-${version}.tar.bz2";
|
2016-01-21 08:20:39 +01:00
|
|
|
sha256 = "1m6xq6izcac5186xvvmm8znfjzrg9hq42p69jabdvv7cri4rjvg0";
|
2010-08-05 17:47:15 +02:00
|
|
|
};
|
|
|
|
|
2016-02-18 07:07:23 +01:00
|
|
|
cmakeFlags = with stdenv.lib; []
|
|
|
|
++ optional stdenv.isDarwin "-DICONV_LIBRARY=${libiconv}/lib/libiconv.dylib"
|
|
|
|
++ 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 23:02:39 +02:00
|
|
|
|
2016-02-18 07:07:23 +01:00
|
|
|
buildInputs = with stdenv.lib; [
|
|
|
|
ncurses python openssl aspell gnutls zlib curl pkgconfig
|
|
|
|
libgcrypt pycrypto makeWrapper
|
|
|
|
cmake
|
|
|
|
]
|
|
|
|
++ optionals stdenv.isDarwin [ pync libobjc ]
|
|
|
|
++ optional guileSupport guile
|
|
|
|
++ optional luaSupport lua5
|
|
|
|
++ optional perlSupport perl
|
|
|
|
++ optional rubySupport ruby
|
|
|
|
++ optional tclSupport tcl
|
2015-02-28 02:34:18 +01:00
|
|
|
++ extraBuildInputs;
|
2010-08-05 17:47:15 +02:00
|
|
|
|
2015-07-31 01:30:15 +02:00
|
|
|
NIX_CFLAGS_COMPILE = "-I${python}/include/${python.libPrefix} -DCA_FILE=/etc/ssl/certs/ca-certificates.crt";
|
2014-05-14 03:31:43 +02:00
|
|
|
|
2012-12-28 02:17:04 +01:00
|
|
|
postInstall = ''
|
2014-05-14 06:46:39 +02:00
|
|
|
NIX_PYTHONPATH="$out/lib/${python.libPrefix}/site-packages"
|
2015-02-28 02:34:18 +01:00
|
|
|
wrapProgram "$out/bin/weechat" \
|
|
|
|
--prefix PYTHONPATH : "$PYTHONPATH" \
|
|
|
|
--prefix PYTHONPATH : "$NIX_PYTHONPATH"
|
2012-12-28 02:17:04 +01:00
|
|
|
'';
|
|
|
|
|
2010-08-05 17:47:15 +02:00
|
|
|
meta = {
|
2013-10-07 13:24:54 +02:00
|
|
|
homepage = http://www.weechat.org/;
|
2010-08-05 17:47:15 +02:00
|
|
|
description = "A fast, light and extensible chat client";
|
2012-06-02 00:04:08 +02:00
|
|
|
license = stdenv.lib.licenses.gpl3;
|
2014-05-14 03:31:43 +02:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ lovek323 garbas the-kenny ];
|
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2010-08-05 17:47:15 +02:00
|
|
|
};
|
|
|
|
}
|