@@ -1,26 +1,35 @@
11{ lib
22, buildPythonPackage
3−, fetchPypi
3+, fetchFromGitHub
44, pytest
55, pythonOlder
66}:
77
88if !(pythonOlder "3.3") then null else buildPythonPackage rec {
99 pname = "backports.shutil_get_terminal_size";
10− version = "1.0.0";
10+ version = "unstable-2016-02-21";
1111
12− src = fetchPypi {
13− inherit pname version;
14− sha256 = "713e7a8228ae80341c70586d1cc0a8caa5207346927e23d09dcbcaf18eadec80";
12+ # there have been numerous fixes commited since the initial release.
13+ # Most notably fixing a problem where the backport would always return
14+ # terminal size 0. See https://trac.sagemath.org/ticket/25320#comment:5.
15+ # Unfortunately the maintainer seems inactive and has not responded to
16+ # a request for a new release since 2016:
17+ # https://github.com/chrippa/backports.shutil_get_terminal_size/issues/7
18+ src = fetchFromGitHub {
19+ owner = "chrippa";
20+ repo = "backports.shutil_get_terminal_size";
21+ rev = "159e269450dbf37c3a837f6ea7e628d59acbb96a";
22+ sha256 = "17sgv8vg0xxfdnca45l1mmwwvj29gich5c8kqznnj51kfccch7sg";
1523 };
1624
1725 checkInputs = [
1826 pytest
1927 ];
2028
21− meta = {
29+ meta = with lib; {
2230 description = "A backport of the get_terminal_size function from Python 3.3’s shutil.";
2331 homepage = https://github.com/chrippa/backports.shutil_get_terminal_size;
24− license = with lib.licenses; [ mit ];
32+ license = with licenses; [ mit ];
33+ maintainers = with maintainers; [ timokau ];
2534 };
26−}
35+}