diff --git a/pkgs/applications/networking/instant-messengers/blink/default.nix b/pkgs/applications/networking/instant-messengers/blink/default.nix index 7b0e4d70fd9..0a6d04aef64 100644 --- a/pkgs/applications/networking/instant-messengers/blink/default.nix +++ b/pkgs/applications/networking/instant-messengers/blink/default.nix @@ -3,11 +3,11 @@ pythonPackages.buildPythonApplication rec { name = "blink-${version}"; - version = "1.4.2"; + version = "2.0.0"; src = fetchurl { url = "http://download.ag-projects.com/BlinkQt/${name}.tar.gz"; - sha256 = "0ia5hgwyg6cm393ik4ggzhcmc957ncswycs07ilwj6vrrzraxfk7"; + sha256 = "07hvy45pavgkvdlh4wbz3shsxh4fapg96qlqmfymdi1nfhwghb05"; }; patches = [ ./pythonpath.patch ]; diff --git a/pkgs/applications/networking/instant-messengers/blink/pythonpath.patch b/pkgs/applications/networking/instant-messengers/blink/pythonpath.patch index 723e097ea82..0df8bc84ff3 100644 --- a/pkgs/applications/networking/instant-messengers/blink/pythonpath.patch +++ b/pkgs/applications/networking/instant-messengers/blink/pythonpath.patch @@ -1,14 +1,44 @@ -diff -rupN a/blink/resources.py b/blink/resources.py ---- a/blink/resources.py 2015-03-17 03:24:06.000000000 -0600 -+++ b/blink/resources.py 2015-04-07 22:52:06.101096413 -0600 -@@ -60,14 +60,7 @@ class Resources(object): +--- blink-2.0.0/blink/resources.py 2016-03-09 14:39:07.000000000 +0100 ++++ blink-2.0.0/blink/resources-patched.py 2016-03-12 21:34:14.965476623 +0100 +@@ -1,7 +1,10 @@ ++# Copyright (C) 2010-2013 AG Projects. See LICENSE for details. ++# + + """Provide access to Blink's resources""" + +-import __main__ ++__all__ = ['ApplicationData', 'Resources', 'IconManager'] ++ + import imghdr + import os + import platform +@@ -19,14 +22,10 @@ + from blink.util import run_in_gui_thread + + +-__all__ = ['ApplicationData', 'Resources', 'IconManager'] +- +- + class DirectoryContextManager(unicode): + def __enter__(self): + self.directory = os.getcwdu() + os.chdir(self) +- + def __exit__(self, type, value, traceback): + os.chdir(self.directory) + +@@ -61,18 +60,7 @@ @classproperty def directory(cls): if cls._cached_directory is None: -- if sys.path[0] == '': -- application_directory = os.path.realpath('') # executed in interactive interpreter +- try: +- binary_directory = os.path.dirname(os.path.realpath(__main__.__file__)) +- except AttributeError: +- if hasattr(sys, 'frozen'): +- application_directory = os.path.dirname(os.path.realpath(sys.executable)) +- else: +- application_directory = os.path.realpath('') # executed in interactive interpreter - else: -- binary_directory = os.path.dirname(os.path.realpath(sys.argv[0])) - if os.path.basename(binary_directory) == 'bin': - application_directory = os.path.dirname(binary_directory) - else: @@ -17,4 +47,3 @@ diff -rupN a/blink/resources.py b/blink/resources.py if os.path.exists(os.path.join(application_directory, 'resources', 'blink.ui')): cls._cached_directory = os.path.join(application_directory, 'resources').decode(sys.getfilesystemencoding()) else: -Binary files a/blink/.resources.py.swp and b/blink/.resources.py.swp differ