nixpkgs/pkgs/applications/networking/instant-messengers/gajim/default.nix

55 lines
2.1 KiB
Nix
Raw Normal View History

a :
let
fetchurl = a.fetchurl;
version = a.lib.attrByPath ["version"] "0.15.3" a;
buildInputs = with a; [
python pyGtkGlade gtk perl intltool dbus gettext
pkgconfig makeWrapper libglade pyopenssl libXScrnSaver
libXt xproto libXext xextproto libX11 gtkspell aspell
scrnsaverproto pycrypto pythonDBus pythonSexy
2012-09-23 17:39:26 +00:00
docutils pyasn1 farstream gst_plugins_bad gstreamer
gst_ffmpeg gst_python
];
in
rec {
src = fetchurl {
2012-09-13 12:39:38 +00:00
url = "http://www.gajim.org/downloads/0.15/gajim-${version}.tar.gz";
sha256 = "139yl7v1i6g9q66fdmzw0x7hhp7c4x44n4l8hl9g6m9zig5v3s28";
};
inherit buildInputs;
configureFlags = [];
preConfigure = a.fullDepEntry (''
export PYTHONPATH="$PYTHONPATH''${PYTHONPATH:+:}$(toPythonPath ${a.pyGtkGlade})/gtk-2.0"
export PYTHONPATH="$PYTHONPATH''${PYTHONPATH:+:}$(toPythonPath ${a.pygobject})/gtk-2.0"
sed -e '/-L[$]x_libraries/d' -i configure
2012-09-13 15:24:25 +00:00
sed -e 's@tmpfd.close()@os.close(tmpfd)@' -i src/common/latex.py
'') ["addInputs" "doUnpack"];
fixScriptNames = a.fullDepEntry (''
mkdir "$out"/bin-wrapped
for i in "$out"/bin/.*-wrapped; do
name="$i"
name="''${name%-wrapped}"
name="''${name##*/.}"
mv "$i" "$out/bin-wrapped/$name"
sed -e 's^'"$i"'^'"$out/bin-wrapped/$name"'^' -i "$out/bin/$name"
2012-09-13 15:24:25 +00:00
sed -e "2aexport LD_LIBRARY_PATH=\"\$LD_LIBRARY_PATH\''${LD_LIBRARY_PATH:+:}${a.gtkspell}/lib:${a.gtkspell}/lib64\"" -i "$out/bin/gajim"
2012-09-13 14:53:09 +00:00
sed -e "2aexport NIX_LDFLAGS=\"\$NIX_LDFLAGS -L${a.gtkspell}/lib -L${a.gtkspell}/lib64\"" -i "$out/bin/gajim"
2012-09-23 17:39:26 +00:00
sed -e "2aexport GST_PLUGIN_PATH=\"\$GST_PLUGIN_PATH''${GST_PLUGIN_PATH:+:}$(echo ${a.gst_plugins_bad}/lib/gstreamer-*):$(echo ${a.gst_ffmpeg}/lib/gstreamer-*):$(echo ${a.farstream}/lib/gstreamer-*)\"" -i "$out/bin/gajim"
done
'') ["wrapBinContentsPython"];
/* doConfigure should be removed if not needed */
2012-09-13 14:02:41 +00:00
phaseNames = ["preConfigure" (a.doDump "1") "doConfigure" "doMakeInstall"
2012-09-13 15:24:25 +00:00
"wrapBinContentsPython" "fixScriptNames"];
name = "gajim-" + version;
meta = {
description = "Jabber client with meta-contacts";
maintainers = [a.lib.maintainers.raskin];
};
}