diff options
author | aszlig <aszlig@redmoonstudios.org> | 2014-07-14 14:46:18 +0200 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2014-07-14 15:20:23 +0200 |
commit | d7b4a0e115bb46309706285e6005a64eae122568 (patch) | |
tree | 7d13afd3b0893ea12ccf3b47d43f07ec18d29ad3 /overrides/gajim | |
parent | 0aad7f1b85b854feea09308d32c046f68eb45e6b (diff) |
Move new packages from overrides/ into pkgs/.
Those packages aren't actually overrides and thus it doesn't make sense to categorize them into "overrides". Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'overrides/gajim')
-rw-r--r-- | overrides/gajim/0.16-pre.nix | 89 | ||||
-rw-r--r-- | overrides/gajim/config.patch | 80 |
2 files changed, 0 insertions, 169 deletions
diff --git a/overrides/gajim/0.16-pre.nix b/overrides/gajim/0.16-pre.nix deleted file mode 100644 index c11e0284..00000000 --- a/overrides/gajim/0.16-pre.nix +++ /dev/null @@ -1,89 +0,0 @@ -{ stdenv, fetchurl, fetchhg, python, intltool, pkgconfig, libX11, gtk -, host, pyopenssl, pythonDBus, pythonPackages, nbxmpp - -, enableJingle ? true, farstream ? null, gst_plugins_bad ? null -, libnice ? null -, enableE2E ? true -, enableRST ? true -, enableSpelling ? true, gtkspell ? null -, enableNotifications ? false -, enableLaTeX ? false, texLive ? null - -# FIXME: Remove after final release. -, autoconf, automake, libtool -}: - -assert enableJingle -> farstream != null && gst_plugins_bad != null - && libnice != null; -assert enableE2E -> pythonPackages.pycrypto != null; -assert enableRST -> pythonPackages.docutils != null; -assert enableSpelling -> gtkspell != null; -assert enableNotifications -> pythonPackages.notify != null; -assert enableLaTeX -> texLive != null; - -with stdenv.lib; - -stdenv.mkDerivation rec { - name = "gajim-${version}"; - version = "0.16"; - - src = fetchhg { - url = "http://hg.gajim.org/gajim"; - rev = "f38e5fd4f8e3"; - sha256 = "17wmy355znfkv4fbwa4hzicr17k8if75mh3b14yphszfw3bh3mfw"; - }; - - preConfigure = '' - sed -e 's/\<which\>/type -P/' autogen.sh | sh - ''; - - postPatch = '' - sed -i -e '0,/^[^#]/ { - /^[^#]/i export \\\ - PYTHONPATH="'"$PYTHONPATH\''${PYTHONPATH:+:}\$PYTHONPATH"'" \\\ - GST_PLUGIN_PATH="'"\$GST_PLUGIN_PATH''${GST_PLUGIN_PATH:+:}${"" - }$GST_PLUGIN_PATH"'" - }' scripts/gajim.in - - sed -i -e 's/return helpers.is_in_path('"'"'nslookup.*/return True/' \ - src/features_window.py - sed -i -e '/is_in_path\|return \[.host/'"s|'host'|'${host}/bin/host'|" \ - src/common/resolver.py - '' + optionalString enableSpelling '' - sed -i -e 's|=.*find_lib.*|= "${gtkspell}/lib/libgtkspell.so"|' \ - src/gtkspell.py - '' + optionalString enableLaTeX '' - sed -i -e "s|try_run(.'dvipng'|try_run(['${texLive}/bin/dvipng'|" \ - -e "s|try_run(.'latex'|try_run(['${texLive}/bin/latex'|" \ - -e 's/tmpfd.close()/os.close(tmpfd)/' \ - src/common/latex.py - ''; - - buildInputs = [ - python intltool pkgconfig libX11 - pythonPackages.pygobject pythonPackages.pyGtkGlade - pythonPackages.sqlite3 pythonPackages.pyasn1 - pythonPackages.pyxdg nbxmpp - pyopenssl pythonDBus - # FIXME: Remove after final release. - autoconf automake libtool - ] ++ optionals enableJingle [ farstream gst_plugins_bad libnice ] - ++ optional enableE2E pythonPackages.pycrypto - ++ optional enableRST pythonPackages.docutils - ++ optional enableNotifications pythonPackages.notify - ++ optional enableLaTeX texLive; - - postInstall = '' - install -m 644 -t "$out/share/gajim/icons/hicolor" \ - "icons/hicolor/index.theme" - ''; - - enableParallelBuilding = true; - - meta = { - homepage = "http://gajim.org/"; - description = "Jabber client written in PyGTK"; - license = licenses.gpl3Plus; - maintainers = [ maintainers.raskin maintainers.aszlig ]; - }; -} diff --git a/overrides/gajim/config.patch b/overrides/gajim/config.patch deleted file mode 100644 index ef40284f..00000000 --- a/overrides/gajim/config.patch +++ /dev/null @@ -1,80 +0,0 @@ -diff --git a/src/common/optparser.py b/src/common/optparser.py -index f84b18a..0078317 100644 ---- a/src/common/optparser.py -+++ b/src/common/optparser.py -@@ -30,6 +30,7 @@ import os - import sys - import locale - import re -+from itertools import chain - from time import time - from common import gajim - from common import helpers -@@ -46,19 +47,25 @@ class OptionsParser: - - def read(self): - try: -- fd = open(self.__filename) -+ cfg = nixfd = open("@nix_config@", 'r') - except Exception: - if os.path.exists(self.__filename): - #we talk about a file - print _('Error: cannot open %s for reading') % self.__filename - return False - -+ try: -+ fd = open(self.__filename) -+ cfg = chain(cfg, fd) -+ except Exception: -+ fd = None -+ - new_version = gajim.config.get('version') - new_version = new_version.split('-', 1)[0] - seen = set() - regex = re.compile(r"(?P<optname>[^.]+)(?:(?:\.(?P<key>.+))?\.(?P<subname>[^.]+))?\s=\s(?P<value>.*)") - -- for line in fd: -+ for line in cfg: - try: - line = line.decode('utf-8') - except UnicodeDecodeError: -@@ -79,10 +86,13 @@ class OptionsParser: - self.update_config(old_version, new_version) - self.old_values = {} # clean mem - -- fd.close() -+ if fd is not None: -+ fd.close() -+ -+ nixfd.close() - return True - -- def write_line(self, fd, opt, parents, value): -+ def write_line(self, (fd, nixcfg), opt, parents, value): - if value is None: - return - value = value[1] -@@ -102,17 +112,21 @@ class OptionsParser: - p = p.encode('utf-8') - s += p + '.' - s += opt -- fd.write(s + ' = ' + value + '\n') -+ line = s + ' = ' + value + '\n' -+ if not nixcfg.startswith(line) and not ('\n' + line) in nixcfg: -+ fd.write(line) - - def write(self): - (base_dir, filename) = os.path.split(self.__filename) - self.__tempfile = os.path.join(base_dir, '.' + filename) -+ - try: -+ nixcfg = open("@nix_config@", 'r').read() - f = open(self.__tempfile, 'w') - except IOError, e: - return str(e) - try: -- gajim.config.foreach(self.write_line, f) -+ gajim.config.foreach(self.write_line, (f, nixcfg)) - except IOError, e: - return str(e) - f.flush() |