Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update blink and add related tool sipclients3 #136924

Closed
wants to merge 12 commits into from
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Expand Up @@ -1853,6 +1853,12 @@
githubId = 1762540;
name = "Changlin Li";
};
chanley = {
email = "charlieshanley@gmail.com";
github = "charlieshanley";
githubId = 8228888;
name = "Charlie Hanley";
};
CharlesHD = {
email = "charleshdespointes@gmail.com";
github = "CharlesHD";
Expand Down
84 changes: 45 additions & 39 deletions pkgs/applications/networking/instant-messengers/blink/default.nix
@@ -1,68 +1,74 @@
{ lib, fetchdarcs, python2Packages, libvncserver, zlib
, gnutls, libvpx, makeDesktopItem, mkDerivationWith }:
{ lib, python3, libvncserver, xorg, makeDesktopItem, copyDesktopItems
, mkDerivationWith, fetchdarcs, callPackage }:

mkDerivationWith python2Packages.buildPythonApplication rec {
with python3.pkgs;
mkDerivationWith buildPythonApplication rec {

pname = "blink";
version = "3.2.0";
version = "5.1.7";

src = fetchdarcs {
url = "http://devel.ag-projects.com/repositories/blink-qt";
rev = "release-${version}";
sha256 = "19rcwr5scw48qnj79q1pysw95fz9h98nyc3161qy2kph5g7dwkc3";
rev = version;
sha256 = "sha256-vwUfGfrphEssEceTxkMKSaZkobuZM5o/cLeYMuf9h0U=";
};

patches = [ ./pythonpath.patch ];
postPatch = ''
sed -i 's|@out@|'"''${out}"'|g' blink/resources.py
'';

propagatedBuildInputs = with python2Packages; [
propagatedBuildInputs = [
pyqt5_with_qtwebkit
cjson
sipsimple
twisted
python3-application
python3-eventlib
python3-sipsimple
google-api-python-client
];

nativeBuildInputs = [
cython
copyDesktopItems
];

buildInputs = [
python2Packages.cython
zlib
libvncserver
libvpx
xorg.libxcb
];

desktopItem = makeDesktopItem {
name = "Blink";
exec = "blink";
comment = meta.description;
desktopName = "Blink";
icon = "blink";
genericName = "Instant Messaging";
categories = "Internet;";
};
doCheck = false; # there are none, but test discovery dies trying to import a Windows library
pythonImportsCheck = [ "blink" ];

dontWrapQtApps = true;

preFixup = ''
wrapQtApp "$out/bin/blink"
'';

postInstall = ''
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"
'';

preFixup = ''
makeWrapperArgs+=(
--prefix "LD_LIBRARY_PATH" ":" "${gnutls.out}/lib"
"''${qtWrapperArgs[@]}"
)
'';
desktopItems = [ (makeDesktopItem {
name = "Blink";
desktopName = "Blink";
genericName = "SIP client";
comment = meta.description;
extraDesktopEntries = { X-GNOME-FullName = "Blink SIP client"; };
exec = "blink";
icon = "blink";
startupNotify = false;
terminal = false;
categories = "Qt;Network;Telephony";
}) ];

meta = with lib; {
homepage = "http://icanblink.com/";
description = "A state of the art, easy to use SIP client for Voice, Video and IM";
homepage = "https://icanblink.com/";
description = "Fully featured, easy to use SIP client with a Qt based UI";
longDescription = ''
Blink is a fully featured SIP client written in Python and built on top of
SIP SIMPLE client SDK with a Qt based user interface. Blink provides real
time applications based on SIP and related protocols for Audio, Video,
Instant Messaging, File Transfers, Desktop Sharing and Presence.
'';
platforms = platforms.linux;
license = licenses.gpl3;
maintainers = with maintainers; [ pSub ];
license = licenses.gpl3Plus;
maintainers = with maintainers; [ pSub chanley ];
};
}
@@ -0,0 +1,42 @@
diff --git a/gnutls/library/__init__.py b/gnutls/library/__init__.py
index c1d898a..b87bd2e 100644
--- a/gnutls/library/__init__.py
+++ b/gnutls/library/__init__.py
@@ -18,35 +18,19 @@ def _library_locations(abi_version):
system = _get_system_name()
if system == "darwin":
library_names = ["libgnutls.%d.dylib" % abi_version]
- dynamic_loader_env_vars = ["DYLD_LIBRARY_PATH", "LD_LIBRARY_PATH"]
- additional_paths = ["/usr/local/lib", "/opt/local/lib", "/sw/lib"]
elif system == "windows":
library_names = ["libgnutls-%d.dll" % abi_version]
- dynamic_loader_env_vars = ["PATH"]
- additional_paths = ["."]
elif system == "cygwin":
library_names = ["cyggnutls-%d.dll" % abi_version]
- dynamic_loader_env_vars = ["LD_LIBRARY_PATH"]
- additional_paths = ["/usr/bin"]
else:
# Debian uses libgnutls-deb0.so.28, go figure
library_names = [
"libgnutls.so.%d" % abi_version,
"libgnutls-deb0.so.%d" % abi_version,
]
- dynamic_loader_env_vars = ["LD_LIBRARY_PATH"]
- additional_paths = ["/usr/local/lib"]
for library_name in library_names:
- for path in (
- path
- for env_var in dynamic_loader_env_vars
- for path in os.environ.get(env_var, "").split(":")
- if os.path.isdir(path)
- ):
- yield os.path.join(path, library_name)
- yield library_name
- for path in additional_paths:
- yield os.path.join(path, library_name)
+ path = "@gnutlslib@"
+ yield os.path.join(path, library_name)


def _load_library(abi_versions):
@@ -0,0 +1,38 @@
{ lib, isPy3k, buildPythonPackage, fetchFromGitHub, zope_interface, twisted, ... }:

buildPythonPackage rec {
pname = "python3-application";
version = "3.0.3";

src = fetchFromGitHub {
owner = "AGProjects";
repo = "python3-application";
rev = "8209f3334c9b603fc81509333c38909755f663db";
sha256 = "sha256-hZeG5y/fDTy7EuSkFG8ruMGwK5UaqUv8I3bj4Egyl6A=";
};

propagatedBuildInputs = [ zope_interface twisted ];

disabled = !isPy3k;

pythonImportsCheck = [ "application" ];

meta = with lib; {
description = "A collection of modules that are useful when building python applications";
homepage = "https://github.com/AGProjects/python3-application";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ chanley ];
longDescription = ''
This package is a collection of modules that are useful when building python applications. Their purpose is to eliminate the need to divert resources into implementing the small tasks that every application needs to do in order to run successfully and focus instead on the application logic itself.
The modules that the application package provides are:
1. process - UNIX process and signal management.
2. python - python utility classes and functions.
3. configuration - a simple interface to handle configuration files.
4. log - an extensible system logger for console and syslog.
5. debug - memory troubleshooting and execution timing.
6. system - interaction with the underlying operating system.
7. notification - an application wide notification system.
8. version - manage version numbers for applications and packages.
'';
};
}
@@ -0,0 +1,34 @@
{ lib, fetchFromGitHub, buildPythonPackage, isPy3k, zope_interface, twisted, greenlet, ... }:

buildPythonPackage rec {
pname = "python3-eventlib";
version = "0.3.0";

src = fetchFromGitHub {
owner = "AGProjects";
repo = "python3-eventlib";
rev = "${version}";
sha256 = "sha256-LFW3rCGa7A8tk6SjgYgjkLQ+72GE2WN8wG+XkXYTAoQ=";
};

propagatedBuildInputs = [ zope_interface twisted greenlet ];

disabled = !isPy3k;

dontUseSetuptoolsCheck = true;

pythonImportsCheck = [ "eventlib" ];

meta = with lib; {
description = "A networking library written in Python";
homepage = "https://github.com/AGProjects/python3-eventlib";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ chanley ];
longDescription = ''
Eventlib is a networking library written in Python. It achieves high
scalability by using non-blocking I/O while at the same time retaining
high programmer usability by using coroutines to make the non-blocking io
operations appear blocking at the source code level.
'';
};
}
@@ -0,0 +1,52 @@
{ lib, fetchFromGitHub, buildPythonPackage, isPy3k, gnutls, twisted, pyopenssl
, service-identity, ... }:

buildPythonPackage rec {
pname = "python3-gnutls";
version = "3.1.9";

src = fetchFromGitHub {
owner = "AGProjects";
repo = "python3-gnutls";
rev = "324b78f7cd3d9fe58c89c7f0b2bf94199bd6a6e5";
sha256 = "sha256-18T8bAHlNERHobsspUFvSC6ulN55nrFFb5aqNwU8T00=";
};

disabled = !isPy3k;

propagatedBuildInputs = [ twisted pyopenssl service-identity ];

buildInputs = [ ];

patches = [ ./libgnutls-path.patch ];
postPatch = ''
sed -i 's|@gnutlslib@|'"${gnutls.out}/lib"'|g' gnutls/library/__init__.py
'';

pythonImportsCheck = [ "gnutls" ];

meta = with lib; {
description = "Python wrapper for the GnuTLS library";
homepage = "https://github.com/AGProjects/python3-gnutls";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ chanley ];
longDescription = ''
This package provides a high level object oriented wrapper around libgnutls,
as well as low level bindings to the GnuTLS types and functions via ctypes.
The high level wrapper hides the details of accessing the GnuTLS library via
ctypes behind a set of classes that encapsulate GnuTLS sessions, certificates
and credentials and expose them to python applications using a simple API.

The package also includes a Twisted interface that has seamless intergration
with Twisted, providing connectTLS and listenTLS methods on the Twisted
reactor once imported (the methods are automatically attached to the reactor
by simply importing the GnuTLS Twisted interface module).

The high level wrapper is written using the GnuTLS library bindings that are
made available via ctypes. This makes the wrapper very powerful and flexible
as it has direct access to all the GnuTLS internals and is also very easy to
extend without any need to write C code or recompile anything.

'';
};
}
@@ -0,0 +1,48 @@
{ lib, fetchFromGitHub, buildPythonPackage, isPy3k, application, ag-gnutls, eventlib
, twisted, zope_interface, ... }:

buildPythonPackage rec {
pname = "python3-msrplib";
version = "0.21.1";

src = fetchFromGitHub {
owner = "AGProjects";
repo = "python3-msrplib";
rev = "5bd069620d436d5a65e1c369e43cc6b88857fb9e";
sha256 = "sha256-z0gF/oQW/h3qiCL1cFWBPK7JYzLCNAD7/dg7HfY4rig=";
};

disabled = !isPy3k;

propagatedBuildInputs = [ application ag-gnutls eventlib twisted zope_interface ];

buildInputs = [ ];

meta = with lib; {
description = "Message Session Relay Protocol (MSRP)";
homepage = "https://github.com/AGProjects/python3-msrplib";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ chanley ];
longDescription = ''
Message Session Relay Protocol (MSRP) is a protocol for transmitting a
series of related instant messages in the context of a session. Message
sessions are treated like any other media stream when set up via a
rendezvous or session creation protocol such as the Session Initiation
Protocol (SIP).

A series of related instant messages between two or more parties can be
viewed as part of a "message session", that is, a conversational exchange of
messages with a definite beginning and end. This is in contrast to
individual messages each sent independently. Messaging schemes that track
only individual messages can be described as "page-mode" messaging, whereas
messaging that is part of a "session" with a definite start and end is
called "session-mode" messaging.

Page-mode messaging is enabled in SIP via the SIP MESSAGE method, as defined
in RFC 3428. Session-mode messaging has a number of benefits over page-mode
messaging, however, such as explicit rendezvous, tighter integration with
other media-types, direct client-to-client operation, and brokered privacy
and security.
'';
};
}
@@ -0,0 +1,12 @@
diff --git a/setup.py b/setup.py
index 040c619..2f2f759 100755
--- a/setup.py
+++ b/setup.py
@@ -31,6 +31,6 @@ setup(

packages=['otr'],
provides=['otr'],
- install_requires=['gmpy2', 'zope.interface', 'application', 'cryptography']
+ install_requires=['gmpy2', 'zope.interface', 'python3-application', 'cryptography']
)