aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/python-modules/backports_shutil_get_terminal_size
diff options
context:
space:
mode:
authorMx Kookie <kookie@spacekookie.de>2020-10-31 19:35:09 +0100
committerMx Kookie <kookie@spacekookie.de>2020-10-31 19:35:09 +0100
commitc4625b175f8200f643fd6e11010932ea44c78433 (patch)
treebce3f89888c8ac3991fa5569a878a9eab6801ccc /infra/libkookie/nixpkgs/pkgs/development/python-modules/backports_shutil_get_terminal_size
parent49f735974dd103039ddc4cb576bb76555164a9e7 (diff)
parentd661aa56a8843e991261510c1bb28fdc2f6975ae (diff)
Add 'infra/libkookie/' from commit 'd661aa56a8843e991261510c1bb28fdc2f6975ae'
git-subtree-dir: infra/libkookie git-subtree-mainline: 49f735974dd103039ddc4cb576bb76555164a9e7 git-subtree-split: d661aa56a8843e991261510c1bb28fdc2f6975ae
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/development/python-modules/backports_shutil_get_terminal_size')
-rw-r--r--infra/libkookie/nixpkgs/pkgs/development/python-modules/backports_shutil_get_terminal_size/default.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/development/python-modules/backports_shutil_get_terminal_size/default.nix b/infra/libkookie/nixpkgs/pkgs/development/python-modules/backports_shutil_get_terminal_size/default.nix
new file mode 100644
index 000000000000..34a7ddefa47f
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/development/python-modules/backports_shutil_get_terminal_size/default.nix
@@ -0,0 +1,35 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, pytest
+, pythonOlder
+}:
+
+if !(pythonOlder "3.3") then null else buildPythonPackage {
+ pname = "backports.shutil_get_terminal_size";
+ version = "unstable-2016-02-21";
+
+ # there have been numerous fixes commited since the initial release.
+ # Most notably fixing a problem where the backport would always return
+ # terminal size 0. See https://trac.sagemath.org/ticket/25320#comment:5.
+ # Unfortunately the maintainer seems inactive and has not responded to
+ # a request for a new release since 2016:
+ # https://github.com/chrippa/backports.shutil_get_terminal_size/issues/7
+ src = fetchFromGitHub {
+ owner = "chrippa";
+ repo = "backports.shutil_get_terminal_size";
+ rev = "159e269450dbf37c3a837f6ea7e628d59acbb96a";
+ sha256 = "17sgv8vg0xxfdnca45l1mmwwvj29gich5c8kqznnj51kfccch7sg";
+ };
+
+ checkInputs = [
+ pytest
+ ];
+
+ meta = with lib; {
+ description = "A backport of the get_terminal_size function from Python 3.3’s shutil.";
+ homepage = "https://github.com/chrippa/backports.shutil_get_terminal_size";
+ license = with licenses; [ mit ];
+ maintainers = with maintainers; [ timokau ];
+ };
+}