diff --git a/pkgs/development/python-modules/bcrypt.nix b/pkgs/development/python-modules/bcrypt.nix new file mode 100644 index 000000000000..94f04880c8e1 --- /dev/null +++ b/pkgs/development/python-modules/bcrypt.nix @@ -0,0 +1,23 @@ +{ stdenv, buildPythonPackage, isPyPy, fetchurl +, cffi, pycparser, mock, pytest, py }: + +with stdenv.lib; + +buildPythonPackage rec { + name = "bcrypt-${version}"; + version = "3.1.2"; + + src = fetchurl { + url = "mirror://pypi/b/bcrypt/${name}.tar.gz"; + sha256 = "1al54xafv1aharpb22yv5rjjc63fm60z3pn2shbiq48ah9f1fvil"; + }; + buildInputs = [ pycparser mock pytest py ]; + propagatedBuildInputs = optional (!isPyPy) cffi; + + meta = { + maintainers = with maintainers; [ domenkozar ]; + description = "Modern password hashing for your software and your servers"; + license = licenses.asl20; + homepage = https://github.com/pyca/bcrypt/; + }; +} diff --git a/pkgs/development/python-modules/dulwich.nix b/pkgs/development/python-modules/dulwich.nix new file mode 100644 index 000000000000..d482aa146279 --- /dev/null +++ b/pkgs/development/python-modules/dulwich.nix @@ -0,0 +1,27 @@ +{ stdenv, buildPythonPackage, fetchurl +, gevent, geventhttpclient, mock, fastimport +, git, glibcLocales }: + +buildPythonPackage rec { + name = "dulwich-${version}"; + version = "0.14.1"; + + src = fetchurl { + url = "mirror://pypi/d/dulwich/${name}.tar.gz"; + sha256 = "14xsyxha6qyxxyf0ma3zv1sy31iy22vzwayk519n7a1gwzk4j7vw"; + }; + + LC_ALL = "en_US.UTF-8"; + + # Only test dependencies + buildInputs = [ git glibcLocales gevent geventhttpclient mock fastimport ]; + + doCheck = !stdenv.isDarwin; + + meta = with stdenv.lib; { + description = "Simple Python implementation of the Git file formats and protocols"; + homepage = http://samba.org/~jelmer/dulwich/; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ koral ]; + }; +} diff --git a/pkgs/development/python-modules/flask-elastic.nix b/pkgs/development/python-modules/flask-elastic.nix new file mode 100644 index 000000000000..9ea9616fbda1 --- /dev/null +++ b/pkgs/development/python-modules/flask-elastic.nix @@ -0,0 +1,22 @@ +{ stdenv, buildPythonPackage, fetchurl +, flask, elasticsearch }: + +buildPythonPackage rec { + name = "Flask-Elastic-${version}"; + version = "0.2"; + + src = fetchurl { + url = "mirror://pypi/F/Flask-Elastic/${name}.tar.gz"; + sha256 = "0hqkwff6z78aspkf1cf815qwp02g3ch1y9dhm5v2ap8vakyac0az"; + }; + + propagatedBuildInputs = [ flask elasticsearch ]; + doCheck = false; # no tests + + meta = with stdenv.lib; { + description = "Integrates official client for Elasticsearch into Flask"; + license = licenses.bsd3; + maintainers = [ maintainers.mic92 ]; + homepage = https://github.com/cepture/foppch/flask-elastic; + }; +} diff --git a/pkgs/development/python-modules/flask-ldap-login.nix b/pkgs/development/python-modules/flask-ldap-login.nix new file mode 100644 index 000000000000..37f9d72dd3f8 --- /dev/null +++ b/pkgs/development/python-modules/flask-ldap-login.nix @@ -0,0 +1,25 @@ +{ stdenv, buildPythonPackage, fetchurl +, flask, flask_wtf, flask_testing, ldap +, mock, nose }: + +buildPythonPackage rec { + name = "flask-ldap-login-0.3.0"; + + src = fetchurl { + url = "mirror://pypi/f/flask-ldap-login/${name}.tar.gz"; + sha256 = "085rik7q8xrp5g95346p6jcp9m2yr8kamwb2kbiw4q0b0fpnnlgq"; + }; + + buildInputs = [ nose mock flask_testing ]; + propagatedBuildInputs = [ flask flask_wtf ldap ]; + + checkPhase = "nosetests -d"; + + meta = with stdenv.lib; { + homepage = https://github.com/ContinuumIO/flask-ldap-login; + description = "User session management for Flask"; + license = licenses.mit; + platforms = platforms.all; + maintainers = with maintainers; [ mic92 ]; + }; +} diff --git a/pkgs/development/python-modules/flask-login.nix b/pkgs/development/python-modules/flask-login.nix new file mode 100644 index 000000000000..0149e29bcf78 --- /dev/null +++ b/pkgs/development/python-modules/flask-login.nix @@ -0,0 +1,29 @@ +{ stdenv, buildPythonPackage, fetchFromGitHub, pythonAtLeast +, flask, nose, mock, blinker}: + +buildPythonPackage rec { + name = "Flask-Login-${version}"; + version = "0.4.0"; + + src = fetchFromGitHub { + owner = "maxcountryman"; + repo = "flask-login"; + rev = version; + sha256 = "0sjbmk8m4mmd9g99n6c6lx9nv2jwwqp6qsqhl945w2m0f1sknwdh"; + }; + + buildInputs = [ nose mock ]; + propagatedBuildInputs = [ flask blinker ]; + + checkPhase = "nosetests -d"; + + doCheck = pythonAtLeast "3.3"; + + meta = with stdenv.lib; { + homepage = "https://github.com/maxcountryman/flask-login"; + description = "User session management for Flask"; + license = licenses.mit; + platforms = platforms.all; + maintainers = with maintainers; [ abbradar ]; + }; +} diff --git a/pkgs/development/python-modules/flask-oauthlib.nix b/pkgs/development/python-modules/flask-oauthlib.nix new file mode 100644 index 000000000000..83413dadb7f8 --- /dev/null +++ b/pkgs/development/python-modules/flask-oauthlib.nix @@ -0,0 +1,29 @@ +{ stdenv, buildPythonPackage, fetchFromGitHub +, flask, oauthlib, requests_oauthlib, flask_sqlalchemy +, mock, nose}: +buildPythonPackage rec { + name = "Flask-OAuthlib-${version}"; + version = "0.9.3"; + + src = fetchFromGitHub { + owner = "lepture"; + repo = "flask-oauthlib"; + rev = "v${version}"; + sha256 = "1vnr2kmbwl6mv2fsv92jjxzfibq2m3pnbcs6ba9k32jr1ci7wfh7"; + }; + + buildInputs = [ mock nose ]; + propagatedBuildInputs = [ + flask flask_sqlalchemy oauthlib requests_oauthlib + ]; + + checkPhase = "nosetests -d"; + doCheck = false; # request mocking fails + + meta = with stdenv.lib; { + description = "OAuthlib implementation for Flask"; + license = licenses.mit; + maintainers = [ maintainers.mic92 ]; + homepage = https://github.com/lepture/flask-oauthlib; + }; +} diff --git a/pkgs/development/python-modules/flask-testing.nix b/pkgs/development/python-modules/flask-testing.nix new file mode 100644 index 000000000000..c5fe8f8bdbee --- /dev/null +++ b/pkgs/development/python-modules/flask-testing.nix @@ -0,0 +1,23 @@ +{ stdenv, fetchurl, buildPythonPackage, pythonOlder +, flask, blinker, twill }: + +with stdenv.lib; + +buildPythonPackage rec { + name = "Flask-Testing-0.6.1"; + + src = fetchurl { + url = "mirror://pypi/F/Flask-Testing/${name}.tar.gz"; + sha256 = "1ckmy7kz2qkggdlm9y5wx6gvd2x7qv921dyb059ywfh15hrkkxdb"; + }; + + buildInputs = optionals (pythonOlder "3.0") [ twill ]; + propagatedBuildInputs = [ flask blinker ]; + + meta = { + description = "Flask unittest integration."; + homepage = https://pythonhosted.org/Flask-Testing/; + license = licenses.bsd3; + maintainers = [ maintainers.mic92 ]; + }; +} diff --git a/pkgs/development/python-modules/flask-wtf.nix b/pkgs/development/python-modules/flask-wtf.nix new file mode 100644 index 000000000000..f8f947366806 --- /dev/null +++ b/pkgs/development/python-modules/flask-wtf.nix @@ -0,0 +1,21 @@ +{ stdenv, fetchurl, buildPythonPackage, flask, wtforms, nose }: + +buildPythonPackage rec { + name = "Flask-WTF-0.14.2"; + + src = fetchurl { + url = "mirror://pypi/F/Flask-WTF/${name}.tar.gz"; + sha256 = "0dncc5as2k61b28k8kal5yh3prmv7zya1jz7kvci7ximzmfda52x"; + }; + + propagatedBuildInputs = [ flask wtforms nose ]; + + doCheck = false; # requires external service + + meta = with stdenv.lib; { + description = "Simple integration of Flask and WTForms."; + license = licenses.bsd; + maintainers = [ maintainers.mic92 ]; + homepage = https://github.com/lepture/flask-wtf/; + }; +} diff --git a/pkgs/development/python-modules/ghdiff.nix b/pkgs/development/python-modules/ghdiff.nix new file mode 100644 index 000000000000..156d9f23729b --- /dev/null +++ b/pkgs/development/python-modules/ghdiff.nix @@ -0,0 +1,21 @@ +{ stdenv, buildPythonPackage, fetchurl +, zope_testrunner, six, chardet}: + +buildPythonPackage rec { + name = "ghdiff-0.4"; + + src = fetchurl { + url = "mirror://pypi/g/ghdiff/${name}.tar.gz"; + sha256 = "17mdhi2sq9017nq8rkjhhc87djpi5z99xiil0xz17dyplr7nmkqk"; + }; + + buildInputs = [ zope_testrunner ]; + propagatedBuildInputs = [ six chardet ]; + + meta = with stdenv.lib; { + homepage = https://github.com/kilink/ghdiff; + license = license.mit; + description = "Generate Github-style HTML for unified diffs."; + maintainers = [ maintainers.mic92 ]; + }; +} diff --git a/pkgs/development/python-modules/gunicorn.nix b/pkgs/development/python-modules/gunicorn.nix new file mode 100644 index 000000000000..026e9df360ce --- /dev/null +++ b/pkgs/development/python-modules/gunicorn.nix @@ -0,0 +1,23 @@ +{ stdenv, buildPythonPackage, fetchurl +, pytest, mock, pytestcov, coverage }: + +buildPythonPackage rec { + name = "gunicorn-19.3.0"; + + src = fetchurl { + url = "mirror://pypi/g/gunicorn/${name}.tar.gz"; + sha256 = "12d0jd9y9fyssc28mn8j6nzrck8y05hc946p5h0rmbc25043bj4b"; + }; + + buildInputs = [ pytest mock pytestcov coverage ]; + + prePatch = '' + substituteInPlace requirements_test.txt --replace "==" ">=" + ''; + + meta = with stdenv.lib; { + homepage = http://pypi.python.org/pypi/gunicorn; + description = "WSGI HTTP Server for UNIX"; + license = licenses.mit; + }; +} diff --git a/pkgs/development/python-modules/ldap.nix b/pkgs/development/python-modules/ldap.nix new file mode 100644 index 000000000000..95243f52a38a --- /dev/null +++ b/pkgs/development/python-modules/ldap.nix @@ -0,0 +1,15 @@ +{ buildPythonPackage, isPy3k, fetchurl +, openldap, cyrus_sasl, openssl }: + +buildPythonPackage rec { + name = "ldap-2.4.22"; + disabled = isPy3k; + + src = fetchurl { + url = "mirror://pypi/p/python-ldap/python-${name}.tar.gz"; + sha256 = "1dshpq84kl4xpa0hmnjrh6q5h5bybn09r83sa3z3ybr9jlm8gxcy"; + }; + + NIX_CFLAGS_COMPILE = "-I${cyrus_sasl.dev}/include/sasl"; + propagatedBuildInputs = [openldap cyrus_sasl openssl]; +} diff --git a/pkgs/development/python-modules/markdown2.nix b/pkgs/development/python-modules/markdown2.nix new file mode 100644 index 000000000000..af7511bc9aa3 --- /dev/null +++ b/pkgs/development/python-modules/markdown2.nix @@ -0,0 +1,18 @@ +{ stdenv, buildPythonPackage, fetchurl }: + +buildPythonPackage rec { + name = "markdown2-${version}"; + version = "2.3.1"; + + src = fetchurl { + url = "mirror://pypi/m/markdown2/${name}.zip"; + sha256 = "03nqcx79r9lr5gp2zpqa1n54hnxqczdq27f2j3aazr3r9rsxsqs4"; + }; + + meta = with stdenv.lib; { + description = "A fast and complete Python implementation of Markdown"; + homepage = https://github.com/trentm/python-markdown2; + license = licenses.mit; + maintainers = with maintainers; [ hbunke ]; + }; +} diff --git a/pkgs/development/python-modules/requests-oauthlib.nix b/pkgs/development/python-modules/requests-oauthlib.nix new file mode 100644 index 000000000000..a353ebd39d9b --- /dev/null +++ b/pkgs/development/python-modules/requests-oauthlib.nix @@ -0,0 +1,21 @@ +{ stdenv, buildPythonPackage, fetchurl +, oauthlib, requests2 }: + +buildPythonPackage rec { + version = "0.7.0"; + name = "requests-oauthlib-${version}"; + + src = fetchurl { + url = "http://github.com/requests/requests-oauthlib/archive/v${version}.tar.gz"; + sha256 = "0cdn45k7qla0qwha0rm9pk9bcfhghvmqrdsphs73irs2rzk5cp2j"; + }; + + doCheck = false; # Internet tests fail when building in chroot + propagatedBuildInputs = [ oauthlib requests2 ]; + + meta = with stdenv.lib; { + description = "OAuthlib authentication support for Requests"; + homepage = https://github.com/requests/requests-oauthlib; + maintainers = with maintainers; [ prikhi ]; + }; +} diff --git a/pkgs/development/python-modules/twill/default.nix b/pkgs/development/python-modules/twill/default.nix new file mode 100644 index 000000000000..6d4e3cbf1df3 --- /dev/null +++ b/pkgs/development/python-modules/twill/default.nix @@ -0,0 +1,23 @@ +{ stdenv, buildPythonPackage, fetchurl, isPy3k, pythonPackages }: +buildPythonPackage rec { + name = "twill-0.9.1"; + + disabled = isPy3k; + + src = fetchurl { + url = "mirror://pypi/t/twill/${name}.tar.gz"; + sha256 = "0zmssp41cgb5sz1jym7rxy6mamb64dxq3wra1bn6snna9v653pyj"; + }; + + propagatedBuildInputs = with pythonPackages; [ nose ]; + + doCheck = false; # pypi package comes without tests, other homepage does not provide all verisons + + meta = with stdenv.lib; { + homepage = http://twill.idyll.org/; + description = "a simple scripting language for Web browsing"; + license = licenses.mit; + platforms = platforms.all; + maintainers = with maintainers; [ Mic92 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 78e2cfc7fd5a..385e079284f1 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4875,24 +4875,7 @@ in { }; }; - bcrypt = buildPythonPackage rec { - name = "bcrypt-${version}"; - version = "3.1.0"; - - src = pkgs.fetchurl { - url = "mirror://pypi/b/bcrypt/${name}.tar.gz"; - sha256 = "e54820d8b9eff357d1003f5b8d4b949a632b76b89610d8a933783fd476033ebe"; - }; - buildInputs = with self; [ pycparser mock pytest py ]; - propagatedBuildInputs = with self; optional (!isPyPy) cffi; - - meta = { - maintainers = with maintainers; [ domenkozar ]; - description = "Modern password hashing for your software and your servers"; - license = licenses.asl20; - homepage = https://github.com/pyca/bcrypt/; - }; - }; + bcrypt = callPackage ../development/python-modules/bcrypt.nix { }; cffi = if isPyPy then null else buildPythonPackage rec { name = "cffi-1.9.1"; @@ -10869,32 +10852,10 @@ in { }; }; - - dulwich = buildPythonPackage rec { - name = "dulwich-${version}"; - version = "0.12.0"; - - src = pkgs.fetchurl { - url = "mirror://pypi/d/dulwich/${name}.tar.gz"; - sha256 = "1ihc1bdgxj7i068mhhmkzar56r2vdcj68w0dnsm7aqgcgvrp144g"; - }; - - LC_ALL = "en_US.UTF-8"; - - # Only test dependencies - buildInputs = with self; [ pkgs.git gevent geventhttpclient pkgs.glibcLocales mock fastimport ]; - - doCheck = !stdenv.isDarwin; - - meta = { - description = "Simple Python implementation of the Git file formats and protocols"; - homepage = http://samba.org/~jelmer/dulwich/; - license = licenses.gpl2Plus; - maintainers = with maintainers; [ koral ]; - }; + dulwich = callPackage ../development/python-modules/dulwich.nix { + inherit (pkgs) git glibcLocales; }; - hg-git = buildPythonPackage rec { name = "hg-git-${version}"; version = "0.8.5"; @@ -11453,28 +11414,11 @@ in { }; }; - flask_login = buildPythonPackage rec { - name = "Flask-Login-${version}"; - version = "0.4.0"; + flask_elastic = callPackage ../development/python-modules/flask-elastic.nix { }; - src = pkgs.fetchurl { - url = "mirror://pypi/F/Flask-Login/${name}.tar.gz"; - sha256 = "19w2f33lglkyvxqnj3qghhxa4pr8mp13235k1bd557x52imkapnj"; - }; + flask_login = callPackage ../development/python-modules/flask-login.nix { }; - propagatedBuildInputs = with self; [ flask ]; - - # FIXME - doCheck = false; - - meta = { - homepage = "https://github.com/maxcountryman/flask-login"; - description = "User session management for Flask"; - license = licenses.mit; - platforms = platforms.all; - maintainers = with maintainers; [ abbradar ]; - }; - }; + flask_ldap_login = callPackage ../development/python-modules/flask-ldap-login.nix { }; flask_migrate = buildPythonPackage rec { name = "Flask-Migrate-${version}"; @@ -11501,6 +11445,8 @@ in { }; }; + flask_oauthlib = callPackage ../development/python-modules/flask-oauthlib.nix { }; + flask_principal = buildPythonPackage rec { name = "Flask-Principal-${version}"; version = "0.4.0"; @@ -11578,6 +11524,10 @@ in { }; }; + flask_testing = callPackage ../development/python-modules/flask-testing.nix { }; + + flask_wtf = callPackage ../development/python-modules/flask-wtf.nix { }; + wtforms = buildPythonPackage rec { version = "2.1"; name = "wtforms-${version}"; @@ -12230,6 +12180,8 @@ in { }; }; + ghdiff = callPackage ../development/python-modules/ghdiff.nix { }; + gipc = buildPythonPackage rec { name = "gipc-0.5.0"; disabled = !isPy26 && !isPy27; @@ -12551,21 +12503,7 @@ in { }; }; - gunicorn = buildPythonPackage rec { - name = "gunicorn-19.1.0"; - - src = pkgs.fetchurl { - url = "mirror://pypi/g/gunicorn/${name}.tar.gz"; - sha256 = "ae1dd6452f62b3470bc9acaf62cb5301545fbb9c697d863a5bfe35097ed7a0b3"; - }; - - buildInputs = with self; [ pytest ]; - - meta = { - homepage = http://pypi.python.org/pypi/gunicorn; - description = "WSGI HTTP Server for UNIX"; - }; - }; + gunicorn = callPackage ../development/python-modules/gunicorn.nix { }; hawkauthlib = buildPythonPackage rec { name = "hawkauthlib-${version}"; @@ -21295,17 +21233,8 @@ in { }; }); - ldap = buildPythonPackage rec { - name = "ldap-2.4.19"; - disabled = isPy3k; - - src = pkgs.fetchurl { - url = "mirror://pypi/p/python-ldap/python-${name}.tar.gz"; - sha256 = "0j5hzaar4d0vhnrlpmkczgwm7ci2wibr99a7zx04xddzrhxdpz82"; - }; - - NIX_CFLAGS_COMPILE = "-I${pkgs.cyrus_sasl.dev}/include/sasl"; - propagatedBuildInputs = with self; [pkgs.openldap pkgs.cyrus_sasl pkgs.openssl]; + ldap = callPackage ../development/python-modules/ldap.nix { + inherit (pkgs) openldap cyrus_sasl openssl; }; ldap3 = buildPythonPackage rec { @@ -22235,24 +22164,7 @@ in { }; }; - requests_oauthlib = buildPythonPackage rec { - version = "0.4.1"; - name = "requests-oauthlib-${version}"; - - src = pkgs.fetchurl { - url = "http://github.com/requests/requests-oauthlib/archive/v${version}.tar.gz"; - sha256 = "0vx252nzq5h9m9brwnw2ph8aj526y26jr2dqcafzzcdx6z4l8vj4"; - }; - - doCheck = false; # Internet tests fail when building in chroot - propagatedBuildInputs = with self; [ oauthlib requests2 ]; - - meta = { - description = "OAuthlib authentication support for Requests"; - homepage = https://github.com/requests/requests-oauthlib; - maintainers = with maintainers; [ prikhi ]; - }; - }; + requests_oauthlib = callPackage ../development/python-modules/requests-oauthlib.nix { }; requests_toolbelt = buildPythonPackage rec { version = "0.6.2"; @@ -26100,6 +26012,8 @@ in { }; }; + twill = callPackage ../development/python-modules/twill { }; + twitter = buildPythonPackage rec { name = "twitter-${version}"; version = "1.15.0"; @@ -29742,24 +29656,7 @@ EOF }; }; - - markdown2 = buildPythonPackage rec { - name = "markdown2-${version}"; - version = "2.3.0"; - - src = pkgs.fetchurl { - url = "mirror://pypi/m/markdown2/${name}.zip"; - sha256 = "073zyx3caqa9zlzxa82k9k2nhhn8c5imqpgp5nwqnh0fgaj9pqn8"; - }; - propagatedBuildInputs = with self; []; - meta = { - description = "A fast and complete Python implementation of Markdown"; - homepage = https://github.com/trentm/python-markdown2; - license = licenses.mit; - maintainers = with maintainers; [ hbunke ]; - }; - }; - + markdown2 = callPackage ../development/python-modules/markdown2.nix { }; evernote = buildPythonPackage rec { name = "evernote-${version}";