tkabber: Don't set a default theme.

If people still want the ocean-deep theme, it can still be set by using:

tkabber.override { theme = "ocean-deep"; }

But by default we should not set a theme, so the user will get the same
result as everyone who installs the upstream version.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
aszlig 2014-01-06 13:33:52 +01:00
parent 1212d0be22
commit aae2bab821
No known key found for this signature in database
GPG Key ID: D0EBD0EC8C2DC961

View File

@ -1,5 +1,7 @@
{ stdenv, fetchurl, tcl, tk, tcllib, tcltls, tclgpg
, bwidget, makeWrapper, x11 }:
, bwidget, makeWrapper, x11
, theme ? null
}:
let
tclLibraries = [ bwidget tcllib tcltls tclgpg ];
@ -17,15 +19,14 @@ in stdenv.mkDerivation rec {
sha256 = "49ee6e897dfe52ebac256531b54955e6b39223f606a9b8ad63a52475389db206";
};
defaultTheme = "ocean-deep";
patchPhase = ''
substituteInPlace login.tcl --replace \
"custom::defvar loginconf(sslcacertstore) \"\"" \
"custom::defvar loginconf(sslcacertstore) \$env(OPENSSL_X509_CERT_FILE)"
'' + stdenv.lib.optionalString (theme != null) ''
themePath="$out/share/doc/tkabber/examples/xrdb/${theme}.xrdb"
sed -i '/^if.*load_default_xrdb/,/^}$/ {
s@option readfile \(\[fullpath [^]]*\]\)@option readfile "'"$out/share/doc/tkabber/examples/xrdb/${defaultTheme}.xrdb"'"@
s@option readfile \(\[fullpath [^]]*\]\)@option readfile "'"$themePath"'"@
}' tkabber.tcl
'';