Skip to content

Commit

Permalink
python3Packages.typer: patch for click 8.1.0 compat
Browse files Browse the repository at this point in the history
In 8.1.0 click removed the deprecated `get_terminal_size` function
in favor of letting downstream projects import it from shutil.

pallets/click#2130
tiangolo/typer#375
  • Loading branch information
mweinelt committed Apr 13, 2022
1 parent 967705f commit 68de5c3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkgs/development/python-modules/typer/default.nix
@@ -1,6 +1,7 @@
{ lib
, stdenv
, buildPythonPackage
, fetchpatch
, fetchPypi
, click
, pytestCheckHook
Expand All @@ -25,6 +26,16 @@ buildPythonPackage rec {
sha256 = "1pgm0zsylbmz1r96q4n3rfi0h3pn4jss2yfs83z0yxa90nmsxhv3";
};

patches = [
(fetchpatch {
# use get_terminal_size from shutil; click 8.1.0 compat
# https://github.com/tiangolo/typer/pull/375
name = "typer-click-8.1-compat.patch";
url = "https://github.com/tiangolo/typer/commit/b6efa2f8f40291fd80cf146b617e0ba305f6af3c.patch";
hash = "sha256-m0EWpBUt5njoPsn043b30WdAQELYNn2ycHXBxZCYXZE=";
})
];

propagatedBuildInputs = [
click
];
Expand Down

0 comments on commit 68de5c3

Please sign in to comment.