diff --git a/pkgs/development/python-modules/backports_os/default.nix b/pkgs/development/python-modules/backports_os/default.nix new file mode 100644 index 000000000000..9d0ddc2cad9a --- /dev/null +++ b/pkgs/development/python-modules/backports_os/default.nix @@ -0,0 +1,35 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, setuptools_scm +, future +, isPy3k +, python +, hypothesis +}: + +buildPythonPackage rec { + version = "0.1.1"; + pname = "backports.os"; + disabled = isPy3k; + + src = fetchPypi { + inherit pname version; + sha256 = "b472c4933094306ca08ec90b2a8cbb50c34f1fb2767775169a1c1650b7b74630"; + }; + + buildInputs = [ setuptools_scm ]; + checkInputs = [ hypothesis ]; + propagatedBuildInputs = [ future ]; + + checkPhase = '' + ${python.interpreter} -m unittest discover tests + ''; + + meta = with stdenv.lib; { + homepage = https://github.com/pjdelport/backports.os; + description = "Backport of new features in Python's os module"; + license = licenses.mit; + maintainers = [ maintainers.costrouc ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6f7445c6d8bb..32b9daa45e54 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -995,6 +995,8 @@ in { backports_functools_lru_cache = callPackage ../development/python-modules/backports_functools_lru_cache { }; + backports_os = callPackage ../development/python-modules/backports_os { }; + backports_shutil_get_terminal_size = callPackage ../development/python-modules/backports_shutil_get_terminal_size { }; backports_ssl_match_hostname = if !(pythonOlder "3.5") then null else