From c0282dc0580cafc9b712ecd74e04b25875f34a1c Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Mon, 1 May 2017 10:04:44 +0200 Subject: [PATCH] pythonPackages.flask-restplus_0_8: move to separate file and fix on Python 3.x --- .../python-modules/flask-restplus/0.8.nix | 42 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 22 +--------- 2 files changed, 44 insertions(+), 20 deletions(-) create mode 100644 pkgs/development/python-modules/flask-restplus/0.8.nix diff --git a/pkgs/development/python-modules/flask-restplus/0.8.nix b/pkgs/development/python-modules/flask-restplus/0.8.nix new file mode 100644 index 000000000000..bd586aeb32fd --- /dev/null +++ b/pkgs/development/python-modules/flask-restplus/0.8.nix @@ -0,0 +1,42 @@ +{ lib +, buildPythonPackage +, fetchPypi +, nose +, blinker +, tzlocal +, mock +, rednose +, flask +, six +, jsonschema +, pytz +, aniso8601 +, flask-restful +}: + +buildPythonPackage rec { + pname = "flask-restplus"; + version = "0.8.6"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "3bb76cc156b9a09da62396d82b29fa31e4f27cccf79528538fe7155cf2785593"; + }; + + checkInputs = [ nose blinker tzlocal mock rednose ]; + propagatedBuildInputs = [ flask six jsonschema pytz aniso8601 flask-restful ]; + + # RuntimeError: Working outside of application context. + doCheck = false; + + checkPhase = '' + nosetests + ''; + + meta = { + homepage = "https://github.com/noirbizarre/flask-restplus"; + description = "Fast, easy and documented API development with Flask"; + license = lib.licenses.mit; + }; +} \ No newline at end of file diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8029982420b0..01d076d9d145 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -11594,26 +11594,8 @@ in { }; }; - flask-restplus = buildPythonPackage rec { - name = "flask-restplus-${version}"; - # Exactly 0.8.6 is required by flexget - version = "0.8.6"; - disabled = isPy3k; - - src = pkgs.fetchurl { - url = "mirror://pypi/f/flask-restplus/${name}.tar.gz"; - sha256 = "3bb76cc156b9a09da62396d82b29fa31e4f27cccf79528538fe7155cf2785593"; - }; - - buildInputs = with self; [ nose blinker tzlocal mock rednose ]; - propagatedBuildInputs = with self; [ flask six jsonschema pytz aniso8601 flask-restful ]; - - meta = { - homepage = "https://github.com/noirbizarre/flask-restplus"; - description = "Fast, easy and documented API development with Flask"; - license = licenses.mit; - }; - }; + # Exactly 0.8.6 is required by flexget + flask-restplus_0_8 = callPackage ../development/python-modules/flask-restplus/0.8.nix { }; flask_script = buildPythonPackage rec { name = "Flask-Script-${version}";