From f0bdb5bd89e8f7482f2779b60bdc46e719dde76c Mon Sep 17 00:00:00 2001 From: Julian Stecklina Date: Fri, 9 Jul 2021 14:41:03 +0200 Subject: [PATCH] watson: fix build problem with click 8 pythonPackages brings click 8. Unfortunately, watson is not ready to consume this library yet. Fix by explicitly pulling in click 7 as dependency. See these upstream discussions: https://github.com/TailorDev/Watson/issues/430 https://github.com/TailorDev/Watson/pull/432 --- pkgs/applications/office/watson/default.nix | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/office/watson/default.nix b/pkgs/applications/office/watson/default.nix index b212ae05a9d..74e06d4311c 100644 --- a/pkgs/applications/office/watson/default.nix +++ b/pkgs/applications/office/watson/default.nix @@ -2,8 +2,23 @@ with pythonPackages; -buildPythonApplication rec { +let + # Watson is currently not compatible with Click 8. See the following + # upstream issues / MRs: + # + # https://github.com/TailorDev/Watson/issues/430 + # https://github.com/TailorDev/Watson/pull/432 + # + # Workaround the issue by providing click 7 explicitly. + click7 = pythonPackages.callPackage ../../../development/python-modules/click/7.nix {}; + click7-didyoumean = click-didyoumean.override { + click = click7; + }; +in buildPythonApplication rec { pname = "watson"; + + # When you update Watson, please check whether the Click 7 + # workaround above can go away. version = "2.0.1"; src = fetchFromGitHub { @@ -19,7 +34,7 @@ buildPythonApplication rec { ''; checkInputs = [ pytestCheckHook pytest-mock mock pytest-datafiles ]; - propagatedBuildInputs = [ arrow click click-didyoumean requests ]; + propagatedBuildInputs = [ arrow click7 click7-didyoumean requests ]; nativeBuildInputs = [ installShellFiles ]; meta = with lib; {