From 413b54bcef65a31bc2dda01b3e084682fad78c4a Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Tue, 5 Sep 2017 09:45:55 +0200 Subject: [PATCH] python.pkgs.prompt_toolkit: 1.0.14 -> 1.0.15 --- .../python-modules/prompt_toolkit/default.nix | 40 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 37 +++-------------- 2 files changed, 45 insertions(+), 32 deletions(-) create mode 100644 pkgs/development/python-modules/prompt_toolkit/default.nix diff --git a/pkgs/development/python-modules/prompt_toolkit/default.nix b/pkgs/development/python-modules/prompt_toolkit/default.nix new file mode 100644 index 00000000000..9704f1b92c9 --- /dev/null +++ b/pkgs/development/python-modules/prompt_toolkit/default.nix @@ -0,0 +1,40 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pytest +, docopt +, six +, wcwidth +, pygments +}: + +buildPythonPackage rec { + pname = "prompt_toolkit"; + name = "${pname}-${version}"; + version = "1.0.15"; + + src = fetchPypi { + inherit pname version; + sha256 = "858588f1983ca497f1cf4ffde01d978a3ea02b01c8a26a8bbc5cd2e66d816917"; + }; + checkPhase = '' + rm prompt_toolkit/win32_types.py + py.test -k 'not test_pathcompleter_can_expanduser' + ''; + + checkInputs = [ pytest ]; + propagatedBuildInputs = [ docopt six wcwidth pygments ]; + + meta = { + description = "Python library for building powerful interactive command lines"; + longDescription = '' + prompt_toolkit could be a replacement for readline, but it can be + much more than that. It is cross-platform, everything that you build + with it should run fine on both Unix and Windows systems. Also ships + with a nice interactive Python shell (called ptpython) built on top. + ''; + homepage = https://github.com/jonathanslenders/python-prompt-toolkit; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ nckx ]; + }; +} \ No newline at end of file diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 759a9ed2250..dca008eee60 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -16457,41 +16457,14 @@ in { }; - prompt_toolkit = buildPythonPackage rec { - name = "prompt_toolkit-${version}"; - version = "1.0.14"; + prompt_toolkit = callPackage ../development/python-modules/prompt_toolkit { }; - src = pkgs.fetchurl { - sha256 = "cc66413b1b4b17021675d9f2d15d57e640b06ddfd99bb724c73484126d22622f"; - url = "mirror://pypi/p/prompt_toolkit/${name}.tar.gz"; - }; - checkPhase = '' - rm prompt_toolkit/win32_types.py - py.test -k 'not test_pathcompleter_can_expanduser' - ''; - - buildInputs = with self; [ pytest ]; - propagatedBuildInputs = with self; [ docopt six wcwidth pygments ]; - - meta = { - description = "Python library for building powerful interactive command lines"; - longDescription = '' - prompt_toolkit could be a replacement for readline, but it can be - much more than that. It is cross-platform, everything that you build - with it should run fine on both Unix and Windows systems. Also ships - with a nice interactive Python shell (called ptpython) built on top. - ''; - homepage = https://github.com/jonathanslenders/python-prompt-toolkit; - license = licenses.bsd3; - maintainers = with maintainers; [ nckx ]; - }; - }; - prompt_toolkit_52 = self.prompt_toolkit.override(self: rec { - name = "prompt_toolkit-${version}"; + prompt_toolkit_52 = self.prompt_toolkit.overridePythonAttrs(oldAttrs: rec { + name = "${oldAttrs.pname}-${version}"; version = "0.52"; - src = pkgs.fetchurl { + src = oldAttrs.src.override { + inherit version; sha256 = "00h9ldqmb33nhg2kpks7paldf3n3023ipp124alwp96yz16s7f1m"; - url = "mirror://pypi/p/prompt_toolkit/${name}.tar.gz"; }; # No tests included in archive