From 700c95a7067e5ea069f0ef9b8848aa2d16eb75c7 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 7 Sep 2017 10:01:51 +0200 Subject: [PATCH] python.pkgs.restview: 2.5.2 -> 2.7.0 --- .../python-modules/restview/default.nix | 34 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 26 +------------- 2 files changed, 35 insertions(+), 25 deletions(-) create mode 100644 pkgs/development/python-modules/restview/default.nix diff --git a/pkgs/development/python-modules/restview/default.nix b/pkgs/development/python-modules/restview/default.nix new file mode 100644 index 000000000000..0f2ce45c885c --- /dev/null +++ b/pkgs/development/python-modules/restview/default.nix @@ -0,0 +1,34 @@ +{ lib +, buildPythonPackage +, fetchPypi +, docutils +, readme_renderer +, pygments +, mock +}: + +buildPythonPackage rec { + pname = "restview"; + name = "${pname}-${version}"; + version = "2.7.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "e7842100f3de179c68cfe7c2cf56c61509cd6068bc6dd58ab42c0ade5d5f97ec"; + }; + + propagatedBuildInputs = [ docutils readme_renderer pygments ]; + checkInputs = [ mock ]; + + postPatch = '' + # dict order breaking tests + sed -i 's@@...@' src/restview/tests.py + ''; + + meta = { + description = "ReStructuredText viewer"; + homepage = http://mg.pov.lt/restview/; + license = lib.licenses.gpl2; + maintainers = with lib.maintainers; [ koral ]; + }; +} \ No newline at end of file diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 30732a7bd64c..3b307a423132 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -19136,31 +19136,7 @@ in { }; - restview = buildPythonPackage rec { - name = "restview-${version}"; - version = "2.5.2"; - - src = pkgs.fetchurl { - url = "mirror://pypi/r/restview/${name}.tar.gz"; - sha256 = "0gmdmnlhiy6lagi17maiz312374hk6g6x90fhjwnbrwxif4r9bd5"; - }; - - propagatedBuildInputs = with self; [ docutils readme pygments ]; - buildInputs = with self; [ mock ]; - - patchPhase = '' - # dict order breaking tests - sed -i 's@@...@' src/restview/tests.py - ''; - - meta = { - description = "ReStructuredText viewer"; - homepage = http://mg.pov.lt/restview/; - license = licenses.gpl2; - platforms = platforms.all; - maintainers = with maintainers; [ koral ]; - }; - }; + restview = callPackage ../development/python-modules/restview { }; readme = buildPythonPackage rec { name = "readme-${version}";