summary refs log tree commit diff
path: root/pkgs/applications/networking/errbot
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2020-02-28 12:02:03 -0800
committerJon <jonringer@users.noreply.github.com>2020-02-29 15:58:35 -0800
commitaa89871ae0382e766368164c22a8762fe8330bf5 (patch)
tree83b2cdf04675947da2bab063cfb107b21f893510 /pkgs/applications/networking/errbot
parent5030491a03167f1c8b94eb58236adedd7cca17eb (diff)
downloadnixpkgs-aa89871ae0382e766368164c22a8762fe8330bf5.tar
nixpkgs-aa89871ae0382e766368164c22a8762fe8330bf5.tar.gz
nixpkgs-aa89871ae0382e766368164c22a8762fe8330bf5.tar.bz2
nixpkgs-aa89871ae0382e766368164c22a8762fe8330bf5.tar.lz
nixpkgs-aa89871ae0382e766368164c22a8762fe8330bf5.tar.xz
nixpkgs-aa89871ae0382e766368164c22a8762fe8330bf5.tar.zst
nixpkgs-aa89871ae0382e766368164c22a8762fe8330bf5.zip
errbot: freeze slackclient at 1.2.1
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.
Diffstat (limited to 'pkgs/applications/networking/errbot')
-rw-r--r--pkgs/applications/networking/errbot/default.nix24
1 files changed, 23 insertions, 1 deletions
diff --git a/pkgs/applications/networking/errbot/default.nix b/pkgs/applications/networking/errbot/default.nix
index 402017e129d..66dc8e0d0b5 100644
--- a/pkgs/applications/networking/errbot/default.nix
+++ b/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
+        '';
+      });
     };
   };