summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorLinus Heckemann <git@sphalerite.org>2018-10-17 18:10:05 +0200
committerGitHub <noreply@github.com>2018-10-17 18:10:05 +0200
commitd968906517247932f5e5e35aabe0fa32eb69ffaf (patch)
treef8d59bac5d8e609f14b79ee143942a7ad46763be /pkgs
parentd0d04c26d7a06dee755fe85969c9a4de830169ae (diff)
parentd6a003e95305f87690fb07af7317f8269ee8aac3 (diff)
downloadnixlib-d968906517247932f5e5e35aabe0fa32eb69ffaf.tar
nixlib-d968906517247932f5e5e35aabe0fa32eb69ffaf.tar.gz
nixlib-d968906517247932f5e5e35aabe0fa32eb69ffaf.tar.bz2
nixlib-d968906517247932f5e5e35aabe0fa32eb69ffaf.tar.lz
nixlib-d968906517247932f5e5e35aabe0fa32eb69ffaf.tar.xz
nixlib-d968906517247932f5e5e35aabe0fa32eb69ffaf.tar.zst
nixlib-d968906517247932f5e5e35aabe0fa32eb69ffaf.zip
Merge pull request #48545 from mayflower/poezio-bump
Update poezio
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/networking/instant-messengers/poezio/default.nix28
-rw-r--r--pkgs/development/python-modules/poezio/fix_gnupg_import.patch12
-rw-r--r--pkgs/development/python-modules/slixmpp/default.nix25
-rw-r--r--pkgs/top-level/python-packages.nix55
4 files changed, 55 insertions, 65 deletions
diff --git a/pkgs/applications/networking/instant-messengers/poezio/default.nix b/pkgs/applications/networking/instant-messengers/poezio/default.nix
new file mode 100644
index 000000000000..b5fa1ccc2f41
--- /dev/null
+++ b/pkgs/applications/networking/instant-messengers/poezio/default.nix
@@ -0,0 +1,28 @@
+{ lib, buildPythonApplication, fetchurl, pythonOlder
+, pytest, aiodns, slixmpp, pyinotify, potr, mpd2, cffi, pkgconfig }:
+buildPythonApplication rec {
+    name = "poezio-${version}";
+    version = "0.12";
+
+    disabled = pythonOlder "3.4";
+
+    buildInputs = [ pytest ];
+    propagatedBuildInputs = [ aiodns slixmpp pyinotify potr mpd2 cffi ];
+    nativeBuildInputs = [ pkgconfig ];
+
+    src = fetchurl {
+      url = "http://dev.louiz.org/attachments/download/129/${name}.tar.gz";
+      sha256 = "11n9x82xyjwbqk28lsfnvqwn8qc9flv6w2c64camh6j3148ykpvz";
+    };
+
+    checkPhase = ''
+      py.test
+    '';
+
+    meta = with lib; {
+      description = "Free console XMPP client";
+      homepage = https://poez.io;
+      license = licenses.mit;
+      maintainers = [ maintainers.lsix ];
+    };
+  }
diff --git a/pkgs/development/python-modules/poezio/fix_gnupg_import.patch b/pkgs/development/python-modules/poezio/fix_gnupg_import.patch
deleted file mode 100644
index d75e09b722bf..000000000000
--- a/pkgs/development/python-modules/poezio/fix_gnupg_import.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Nur poezio-0.10.orig/plugins/gpg/__init__.py poezio-0.10/plugins/gpg/__init__.py
---- poezio-0.10.orig/plugins/gpg/__init__.py	2016-07-27 19:02:41.000000000 +0200
-+++ poezio-0.10/plugins/gpg/__init__.py	2016-11-16 14:17:06.011128631 +0100
-@@ -105,7 +105,7 @@
- .. _XEP-0027: http://xmpp.org/extensions/xep-0027.html
- 
- """
--from gpg import gnupg
-+import slixmpp.thirdparty.gnupg as gnupg
- from slixmpp.xmlstream.stanzabase import JID
- 
- from xml.etree import cElementTree as ET
diff --git a/pkgs/development/python-modules/slixmpp/default.nix b/pkgs/development/python-modules/slixmpp/default.nix
new file mode 100644
index 000000000000..0a8e5accea87
--- /dev/null
+++ b/pkgs/development/python-modules/slixmpp/default.nix
@@ -0,0 +1,25 @@
+{ lib, buildPythonPackage, pythonOlder, fetchurl, aiodns, pyasn1, pyasn1-modules, gnupg }:
+buildPythonPackage rec {
+  name = "slixmpp-${version}";
+  version = "1.4.0";
+
+  disabled = pythonOlder "3.4";
+
+  src = fetchurl {
+    url = "mirror://pypi/s/slixmpp/${name}.tar.gz";
+    sha256 = "155qxx4xlkkjb4hphc09nsi2mi4xi3m2akg0z7064kj3nbzkwjn2";
+  };
+
+  patchPhase = ''
+    substituteInPlace slixmpp/thirdparty/gnupg.py \
+      --replace "gpgbinary='gpg'" "gpgbinary='${gnupg}/bin/gpg'"
+  '';
+
+  propagatedBuildInputs = [ aiodns pyasn1 pyasn1-modules gnupg ];
+
+  meta = {
+    description = "Elegant Python library for XMPP";
+    license = lib.licenses.mit;
+    homepage = https://dev.louiz.org/projects/slixmpp;
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index a4d6290ab4e3..0562d60ab159 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -4326,30 +4326,7 @@ in {
     };
   };
 
-  slixmpp = buildPythonPackage rec {
-    name = "slixmpp-${version}";
-    version = "1.2.4.post1";
-
-    disabled = pythonOlder "3.4";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/s/slixmpp/${name}.tar.gz";
-      sha256 = "0v6430dczai8a2nmznhja2dxl6pxa8c5j20nhc5737bqjg7245jk";
-    };
-
-    patchPhase = ''
-      substituteInPlace slixmpp/thirdparty/gnupg.py \
-        --replace "gpgbinary='gpg'" "gpgbinary='${pkgs.gnupg1}/bin/gpg'"
-    '';
-
-    propagatedBuildInputs = with self ; [ aiodns pyasn1 pkgs.gnupg1 pyasn1-modules];
-
-    meta = {
-      description = "Elegant Python library for XMPP";
-      license = licenses.mit;
-      homepage = https://dev.louiz.org/projects/slixmpp;
-    };
-  };
+  slixmpp = callPackage ../development/python-modules/slixmpp {};
 
   netaddr = buildPythonPackage rec {
     pname = "netaddr";
@@ -12331,35 +12308,7 @@ EOF
     };
   };
 
-  poezio = buildPythonApplication rec {
-    name = "poezio-${version}";
-    version = "0.11";
-
-    disabled = pythonOlder "3.4";
-
-    buildInputs = with self; [ pytest ];
-    propagatedBuildInputs = with self ; [ aiodns slixmpp pyinotify potr mpd2 ];
-
-    src = pkgs.fetchurl {
-      url = "http://dev.louiz.org/attachments/download/118/${name}.tar.gz";
-      sha256 = "07cn3717swarjv47yw8x95bvngz4nvlyyy9m7ck9fhycjgdy82r0";
-    };
-
-    patches = [
-      ../development/python-modules/poezio/fix_gnupg_import.patch
-    ];
-
-    checkPhase = ''
-      py.test
-    '';
-
-    meta = {
-      description = "Free console XMPP client";
-      homepage = https://poez.io;
-      license = licenses.mit;
-      maintainers = [ maintainers.lsix ];
-    };
-  };
+  poezio = callPackage ../applications/networking/instant-messengers/poezio { };
 
   potr = callPackage ../development/python-modules/potr {};