about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/errbot
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-04-01 15:50:50 +0000
committerAlyssa Ross <hi@alyssa.is>2020-04-01 15:50:50 +0000
commit75eafe97f7df0d653bec67f3962214d7c357831f (patch)
tree09f2cc901e0e637876cbb78d192dfe2fcfef8156 /nixpkgs/pkgs/applications/networking/errbot
parenta53b121bf4331497da63df3b1b7f1a7897dad146 (diff)
parenta2e06fc3423c4be53181b15c28dfbe0bcf67dd73 (diff)
downloadnixlib-75eafe97f7df0d653bec67f3962214d7c357831f.tar
nixlib-75eafe97f7df0d653bec67f3962214d7c357831f.tar.gz
nixlib-75eafe97f7df0d653bec67f3962214d7c357831f.tar.bz2
nixlib-75eafe97f7df0d653bec67f3962214d7c357831f.tar.lz
nixlib-75eafe97f7df0d653bec67f3962214d7c357831f.tar.xz
nixlib-75eafe97f7df0d653bec67f3962214d7c357831f.tar.zst
nixlib-75eafe97f7df0d653bec67f3962214d7c357831f.zip
Merge commit 'a2e06fc3423c4be53181b15c28dfbe0bcf67dd73'
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/errbot')
-rw-r--r--nixpkgs/pkgs/applications/networking/errbot/default.nix27
1 files changed, 25 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/applications/networking/errbot/default.nix b/nixpkgs/pkgs/applications/networking/errbot/default.nix
index 402017e129d6..d5dc287ecac7 100644
--- a/nixpkgs/pkgs/applications/networking/errbot/default.nix
+++ b/nixpkgs/pkgs/applications/networking/errbot/default.nix
@@ -1,9 +1,9 @@
 { lib, fetchFromGitHub, python, glibcLocales }:
 
 let
-  # errbot requires markdown<3, and is not compatible with it either.
   py = python.override {
     packageOverrides = self: super: {
+      # errbot requires markdown<3, and is not compatible with it either.
       markdown = super.markdown.overridePythonAttrs (oldAttrs: rec {
         version = "2.6.11";
         src = super.fetchPypi {
@@ -12,6 +12,28 @@ let
           sha256 = "108g80ryzykh8bj0i7jfp71510wrcixdi771lf2asyghgyf8cmm8";
         };
       });
+
+      # errbot requires slackclient 1.x, see https://github.com/errbotio/errbot/pull/1367
+      # latest 1.x release would be 1.3.2, but it requires an older websocket_client than the one in nixpkgs
+      # so let's just vendor the known-working version until they've migrated to 2.x.
+      slackclient = super.slackclient.overridePythonAttrs (oldAttrs: rec {
+        version = "1.2.1";
+        pname = "slackclient";
+        src = fetchFromGitHub {
+          owner  = "slackapi";
+          repo   = "python-slackclient";
+          rev    = version;
+          sha256 = "073fwf6fm2sqdp5ms3vm1v3ljh0pldi69k048404rp6iy3cfwkp0";
+        };
+
+        propagatedBuildInputs = with self; [ websocket_client requests six ];
+
+        checkInputs = with self; [ pytest codecov coverage mock pytestcov pytest-mock responses flake8 ];
+        # test_server.py fails because it needs connection (I think);
+        checkPhase = ''
+          py.test --cov-report= --cov=slackclient tests --ignore=tests/test_server.py
+        '';
+      });
     };
   };
 
@@ -48,6 +70,7 @@ py.pkgs.buildPythonApplication rec {
     homepage = http://errbot.io/;
     maintainers = with maintainers; [ fpletz globin ];
     license = licenses.gpl3;
-    platforms = platforms.unix;
+    platforms = platforms.linux;
+    # flaky on darwin, "RuntimeError: can't start new thread"
   };
 }