Merge pull request #185090 from wesnel/python/flask-basicauth/init

authored by Martin Weinelt and committed by GitHub 484c2078 629ec1b3

+56
+54
pkgs/development/python-modules/flask-basicauth/default.nix
··· 1 + { lib 2 + , buildPythonPackage 3 + , fetchFromGitHub 4 + , fetchpatch 5 + , flask 6 + , python 7 + }: 8 + 9 + buildPythonPackage rec { 10 + pname = "flask-basicauth"; 11 + version = "0.2.0"; 12 + 13 + src = fetchFromGitHub { 14 + owner = "jpvanhal"; 15 + repo = pname; 16 + rev = "v${version}"; 17 + sha256 = "sha256-han0OjMI1XmuWKHGVpk+xZB+/+cpV1I+659zOG3hcPY="; 18 + }; 19 + 20 + patches = [ 21 + (fetchpatch { 22 + # The unit tests fail due to an invalid import: 23 + # from flask.ext.basicauth import BasicAuth 24 + # 25 + # This patch replaces it with the correct import: 26 + # from flask_basicauth import BasicAuth 27 + # 28 + # The patch uses the changes from this pull request, 29 + # and therefore can be removed once this pull request 30 + # has been merged: 31 + # https://github.com/jpvanhal/flask-basicauth/pull/29 32 + name = "fix-test-flask-ext-imports.patch"; 33 + url = "https://github.com/jpvanhal/flask-basicauth/commit/23f57dc1c3d85ea6fc7f468e8d8c6f19348a0a81.patch"; 34 + sha256 = "sha256-njUYjO0TRe3vr5D0XjIfCNcsFlShbGxtFV/DJerAKDE="; 35 + }) 36 + ]; 37 + 38 + propagatedBuildInputs = [ flask ]; 39 + 40 + checkPhase = '' 41 + runHook preCheck 42 + ${python.interpreter} -m unittest discover 43 + runHook postCheck 44 + ''; 45 + 46 + pythonImportsCheck = [ "flask_basicauth" ]; 47 + 48 + meta = with lib; { 49 + homepage = "https://github.com/jpvanhal/flask-basicauth"; 50 + description = "HTTP basic access authentication for Flask"; 51 + license = licenses.mit; 52 + maintainers = with maintainers; [ wesnel ]; 53 + }; 54 + }
+2
pkgs/top-level/python-packages.nix
··· 3280 3280 3281 3281 flask-babelex = callPackage ../development/python-modules/flask-babelex { }; 3282 3282 3283 + flask-basicauth = callPackage ../development/python-modules/flask-basicauth { }; 3284 + 3283 3285 flask-bcrypt = callPackage ../development/python-modules/flask-bcrypt { }; 3284 3286 3285 3287 flask-bootstrap = callPackage ../development/python-modules/flask-bootstrap { };