summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/simple/weechat
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2017-06-01 10:08:56 +0200
committermakefu <github@syntax-fehler.de>2017-06-01 10:08:56 +0200
commit772f84305d90380e0d221cf49ae3f1597d0d0510 (patch)
tree8d2241648396dc34fa96c8c68e12f832fbc7c308 /krebs/5pkgs/simple/weechat
parent90822f64e0bf247c5cca2f035077553cac5ceb79 (diff)
parent21d92086fe00c7369fde3951f92e9f73f4c05ee9 (diff)
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'krebs/5pkgs/simple/weechat')
-rw-r--r--krebs/5pkgs/simple/weechat/default.nix80
1 files changed, 80 insertions, 0 deletions
diff --git a/krebs/5pkgs/simple/weechat/default.nix b/krebs/5pkgs/simple/weechat/default.nix
new file mode 100644
index 000000000..c703ca8bf
--- /dev/null
+++ b/krebs/5pkgs/simple/weechat/default.nix
@@ -0,0 +1,80 @@
+{ stdenv, fetchurl, ncurses, openssl, aspell, gnutls
+, zlib, curl , pkgconfig, libgcrypt
+, cmake, makeWrapper, libiconv
+, asciidoctor # manpages
+, guileSupport ? true, guile
+, luaSupport ? true, lua5
+, perlSupport ? true, perl
+, pythonPackages
+, rubySupport ? true, ruby
+, tclSupport ? true, tcl
+, extraBuildInputs ? [] }:
+
+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
+
+stdenv.mkDerivation rec {
+ version = "1.8";
+ name = "weechat-${version}";
+
+ src = fetchurl {
+ url = "http://weechat.org/files/src/weechat-${version}.tar.bz2";
+ sha256 = "10km0437lg9ms6f16h20s89l2w9f9g597rykybxb16s95ql48z08";
+ };
+
+ outputs = [ "out" "doc" ];
+
+ enableParallelBuilding = true;
+ cmakeFlags = with stdenv.lib; [
+ "-DENABLE_MAN=ON"
+ "-DENABLE_DOC=ON"
+ ]
+ ++ optionals stdenv.isDarwin ["-DICONV_LIBRARY=${libiconv}/lib/libiconv.dylib" "-DCMAKE_FIND_FRAMEWORK=LAST"]
+ ++ 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"
+ ;
+
+ buildInputs = with stdenv.lib; [
+ ncurses python openssl aspell gnutls zlib curl pkgconfig
+ libgcrypt pycrypto makeWrapper
+ cmake
+ asciidoctor
+ ]
+ ++ optional guileSupport guile
+ ++ optional luaSupport lua5
+ ++ optional perlSupport perl
+ ++ optional rubySupport ruby
+ ++ optional tclSupport tcl
+ ++ extraBuildInputs;
+
+ NIX_CFLAGS_COMPILE = "-I${python}/include/${python.libPrefix}"
+ # Fix '_res_9_init: undefined symbol' error
+ + (stdenv.lib.optionalString stdenv.isDarwin "-DBIND_8_COMPAT=1 -lresolv");
+
+ postInstall = with stdenv.lib; ''
+ NIX_PYTHONPATH="$out/lib/${python.libPrefix}/site-packages"
+ wrapProgram "$out/bin/weechat" \
+ ${optionalString perlSupport "--prefix PATH : ${perl}/bin"} \
+ --prefix PATH : ${pythonPackages.python}/bin \
+ --prefix PYTHONPATH : "$PYTHONPATH" \
+ --prefix PYTHONPATH : "$NIX_PYTHONPATH"
+ '';
+
+ meta = {
+ homepage = http://www.weechat.org/;
+ description = "A fast, light and extensible chat client";
+ license = stdenv.lib.licenses.gpl3;
+ maintainers = with stdenv.lib.maintainers; [ lovek323 garbas the-kenny ];
+ platforms = stdenv.lib.platforms.unix;
+ };
+}