2017-12-05 20:20:54 +01:00
|
|
|
|
{ lib
|
|
|
|
|
, buildPythonPackage
|
2018-07-02 18:03:05 +02:00
|
|
|
|
, fetchFromGitHub
|
2017-12-05 20:20:54 +01:00
|
|
|
|
, pytest
|
|
|
|
|
, pythonOlder
|
|
|
|
|
}:
|
|
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
|
if !(pythonOlder "3.3") then null else buildPythonPackage {
|
2017-12-05 20:20:54 +01:00
|
|
|
|
pname = "backports.shutil_get_terminal_size";
|
2018-07-02 18:03:05 +02:00
|
|
|
|
version = "unstable-2016-02-21";
|
2017-12-05 20:20:54 +01:00
|
|
|
|
|
2018-07-02 18:03:05 +02:00
|
|
|
|
# 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";
|
2017-12-05 20:20:54 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
|
pytest
|
|
|
|
|
];
|
|
|
|
|
|
2018-07-02 18:03:05 +02:00
|
|
|
|
meta = with lib; {
|
2017-12-05 20:20:54 +01:00
|
|
|
|
description = "A backport of the get_terminal_size function from Python 3.3’s shutil.";
|
2020-04-01 03:11:51 +02:00
|
|
|
|
homepage = "https://github.com/chrippa/backports.shutil_get_terminal_size";
|
2018-07-02 18:03:05 +02:00
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
|
maintainers = with maintainers; [ timokau ];
|
2017-12-05 20:20:54 +01:00
|
|
|
|
};
|
2018-07-02 18:03:05 +02:00
|
|
|
|
}
|