summary refs log tree commit diff
path: root/pkgs/applications/networking/instant-messengers/blink
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2016-04-01 10:06:01 +0200
committerVladimír Čunát <vcunat@gmail.com>2016-04-01 10:06:01 +0200
commitab15a62c68bf7bf3b02e3bab00d121cc1426733c (patch)
tree398a82403b04bfa0bae8cadf1c5a64cf83145965 /pkgs/applications/networking/instant-messengers/blink
parentc643ccaa8c91f78b8c89eb87589886b8906d5b38 (diff)
parenta26357eefe017964448b5bb464163646b927a267 (diff)
downloadnixlib-ab15a62c68bf7bf3b02e3bab00d121cc1426733c.tar
nixlib-ab15a62c68bf7bf3b02e3bab00d121cc1426733c.tar.gz
nixlib-ab15a62c68bf7bf3b02e3bab00d121cc1426733c.tar.bz2
nixlib-ab15a62c68bf7bf3b02e3bab00d121cc1426733c.tar.lz
nixlib-ab15a62c68bf7bf3b02e3bab00d121cc1426733c.tar.xz
nixlib-ab15a62c68bf7bf3b02e3bab00d121cc1426733c.tar.zst
nixlib-ab15a62c68bf7bf3b02e3bab00d121cc1426733c.zip
Merge branch 'master' into closure-size
Beware that stdenv doesn't build. It seems something more will be needed
than just resolution of merge conflicts.
Diffstat (limited to 'pkgs/applications/networking/instant-messengers/blink')
-rw-r--r--pkgs/applications/networking/instant-messengers/blink/default.nix24
-rw-r--r--pkgs/applications/networking/instant-messengers/blink/pythonpath.patch45
2 files changed, 56 insertions, 13 deletions
diff --git a/pkgs/applications/networking/instant-messengers/blink/default.nix b/pkgs/applications/networking/instant-messengers/blink/default.nix
index 7a2c6d7c0dca..d2a08b98c076 100644
--- a/pkgs/applications/networking/instant-messengers/blink/default.nix
+++ b/pkgs/applications/networking/instant-messengers/blink/default.nix
@@ -1,13 +1,13 @@
 { stdenv, fetchurl, pythonPackages, pyqt4, cython, libvncserver, zlib, twisted
-, gnutls, libvpx }:
+, gnutls, libvpx, makeDesktopItem }:
 
 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 ];
@@ -20,16 +20,30 @@ pythonPackages.buildPythonApplication rec {
 
   buildInputs = [ cython zlib libvncserver libvpx ];
 
+  desktopItem = makeDesktopItem {
+    name = "Blink";
+    exec = "blink";
+    comment = meta.description;
+    desktopName = "Blink";
+    icon = "blink";
+    genericName = "Instant Messaging";
+    categories = "Application;Internet;";
+  };
+
   postInstall = ''
     wrapProgram $out/bin/blink \
       --prefix LD_LIBRARY_PATH ":" ${gnutls.out}/lib
+    mkdir -p "$out/share/applications"
+    mkdir -p "$out/share/pixmaps"
+    cp "$desktopItem"/share/applications/* "$out/share/applications"
+    cp "$out"/share/blink/icons/blink.* "$out/share/pixmaps"
   '';
 
   meta = with stdenv.lib; {
     homepage = http://icanblink.com/;
-    description = "A state of the art, easy to use SIP client";
+    description = "A state of the art, easy to use SIP client for Voice, Video and IM";
     platforms = platforms.linux;
-    license = licenses.mit;
+    license = licenses.gpl3;
     maintainers = with maintainers; [ pSub ];
   };
 }
diff --git a/pkgs/applications/networking/instant-messengers/blink/pythonpath.patch b/pkgs/applications/networking/instant-messengers/blink/pythonpath.patch
index 723e097ea826..0df8bc84ff30 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