2012-09-09 05:26:37 +02:00
|
|
|
{ stdenv, fetchurl, tcl, tk, tcllib, tcltls, tclgpg
|
2012-09-09 06:02:57 +02:00
|
|
|
, bwidget, makeWrapper, x11 }:
|
2012-06-04 20:28:40 +02:00
|
|
|
|
2012-09-09 05:41:40 +02:00
|
|
|
let
|
|
|
|
tclLibraries = [ bwidget tcllib tcltls tclgpg ];
|
|
|
|
|
|
|
|
getTclLibPath = p: "${p}/lib/${p.libPrefix}";
|
|
|
|
|
|
|
|
tclLibPaths = stdenv.lib.concatStringsSep " "
|
|
|
|
(map getTclLibPath tclLibraries);
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
2012-06-04 20:28:40 +02:00
|
|
|
name = "tkabber-0.11.1";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://files.jabber.ru/tkabber/tkabber-0.11.1.tar.gz";
|
|
|
|
sha256 = "19xv555cm7a2gczdalf9srxm39hmsh0fbidhwxa74a89nqkbf4lv";
|
|
|
|
};
|
|
|
|
|
|
|
|
defaultTheme = "ocean-deep";
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace login.tcl --replace \
|
|
|
|
"custom::defvar loginconf(sslcacertstore) \"\"" \
|
2012-09-09 06:02:57 +02:00
|
|
|
"custom::defvar loginconf(sslcacertstore) \$env(OPENSSL_X509_CERT_FILE)"
|
2012-06-04 20:28:40 +02:00
|
|
|
|
|
|
|
sed -i '/^if.*load_default_xrdb/,/^}$/ {
|
|
|
|
s@option readfile \(\[fullpath [^]]*\]\)@option readfile "'"$out/share/doc/tkabber/examples/xrdb/${defaultTheme}.xrdb"'"@
|
|
|
|
}' tkabber.tcl
|
|
|
|
'';
|
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
sed -e "s@/usr/local@$out@" -i Makefile
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
2012-09-09 05:55:17 +02:00
|
|
|
wrapProgram $out/bin/tkabber \
|
|
|
|
--set TCLLIBPATH '"${tclLibPaths}"' \
|
|
|
|
--set TKABBER_SITE_PLUGINS '$HOME/.nix-profile/share/tkabber-plugins'
|
2012-06-04 20:28:40 +02:00
|
|
|
'';
|
|
|
|
|
2012-09-09 05:41:40 +02:00
|
|
|
buildInputs = [ tcl tk x11 makeWrapper ] ++ tclLibraries;
|
2012-06-04 20:28:40 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "http://tkabber.jabber.ru/";
|
|
|
|
description = "A GUI client for the XMPP (Jabber) instant messaging protocol";
|
2012-09-09 05:49:15 +02:00
|
|
|
license = stdenv.lib.licenses.gpl2;
|
2012-06-04 20:28:40 +02:00
|
|
|
};
|
|
|
|
}
|