summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/python-modules/cli-helpers/default.nix59
-rw-r--r--pkgs/development/python-modules/pyfxa/default.nix32
-rw-r--r--pkgs/development/python-modules/pymysql/default.nix27
-rw-r--r--pkgs/development/python-modules/tokenserver/default.nix47
4 files changed, 143 insertions, 22 deletions
diff --git a/pkgs/development/python-modules/cli-helpers/default.nix b/pkgs/development/python-modules/cli-helpers/default.nix
new file mode 100644
index 000000000000..69b811a94f4f
--- /dev/null
+++ b/pkgs/development/python-modules/cli-helpers/default.nix
@@ -0,0 +1,59 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, terminaltables
+, tabulate
+, backports_csv
+, wcwidth
+, pytest
+, isPy27
+}:
+
+buildPythonPackage rec {
+  pname = "cli_helpers";
+  version = "1.0.2";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1z5rqm8pznj6bvivm2al8rsxm82rai8hc9bqrgh3ksnbzg2kfy7p";
+  };
+
+  propagatedBuildInputs = [
+    terminaltables
+    tabulate
+    wcwidth
+  ] ++ (lib.optionals isPy27 [ backports_csv ]);
+
+  checkInputs = [ pytest ];
+
+  checkPhase = ''
+    py.test
+  '';
+
+  meta = with lib; {
+    description = "Python helpers for common CLI tasks";
+    longDescription = ''
+      CLI Helpers is a Python package that makes it easy to perform common
+      tasks when building command-line apps. It's a helper library for
+      command-line interfaces.
+
+      Libraries like Click and Python Prompt Toolkit are amazing tools that
+      help you create quality apps. CLI Helpers complements these libraries by
+      wrapping up common tasks in simple interfaces.
+
+      CLI Helpers is not focused on your app's design pattern or framework --
+      you can use it on its own or in combination with other libraries. It's
+      lightweight and easy to extend.
+
+      What's included in CLI Helpers?
+
+      - Prettyprinting of tabular data with custom pre-processing
+      - [in progress] config file reading/writing
+
+      Read the documentation at http://cli-helpers.rtfd.io
+    '';
+    homepage = https://cli-helpers.readthedocs.io/en/stable/;
+    license = licenses.bsd3 ;
+    maintainers = [ maintainers.kalbasit ];
+  };
+}
diff --git a/pkgs/development/python-modules/pyfxa/default.nix b/pkgs/development/python-modules/pyfxa/default.nix
new file mode 100644
index 000000000000..93a74114af19
--- /dev/null
+++ b/pkgs/development/python-modules/pyfxa/default.nix
@@ -0,0 +1,32 @@
+{ lib, buildPythonPackage, fetchPypi
+, requests, cryptography, pybrowserid, hawkauthlib, six
+, grequests, mock, responses, unittest2 }:
+
+buildPythonPackage rec {
+  pname = "PyFxA";
+  version = "0.6.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "d511b6f43a9445587c609a138636d378de76661561116e1f4259fcec9d09b42b";
+  };
+
+  postPatch = ''
+    # Requires network access
+    rm fxa/tests/test_core.py
+  '';
+
+  propagatedBuildInputs = [
+    requests cryptography pybrowserid hawkauthlib six
+  ];
+
+  checkInputs = [
+    grequests mock responses unittest2
+  ];
+
+  meta = with lib; {
+    description = "Firefox Accounts client library for Python";
+    homepage = https://github.com/mozilla/PyFxA;
+    license = licenses.mpl20;
+  };
+}
diff --git a/pkgs/development/python-modules/pymysql/default.nix b/pkgs/development/python-modules/pymysql/default.nix
new file mode 100644
index 000000000000..b440df309977
--- /dev/null
+++ b/pkgs/development/python-modules/pymysql/default.nix
@@ -0,0 +1,27 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, cryptography
+}:
+
+buildPythonPackage rec {
+  pname = "PyMySQL";
+  version = "0.9.2";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0gvi63f1zq1bbd30x28kqyx351hal1yc323ckp0mihainb5n1iwy";
+  };
+
+  propagatedBuildInputs = [ cryptography ];
+
+  # Wants to connect to MySQL
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Pure Python MySQL Client";
+    homepage = https://github.com/PyMySQL/PyMySQL;
+    license = licenses.mit;
+    maintainers = [ maintainers.kalbasit ];
+  };
+}
diff --git a/pkgs/development/python-modules/tokenserver/default.nix b/pkgs/development/python-modules/tokenserver/default.nix
index 44fcb9b46ff9..a07da568dca4 100644
--- a/pkgs/development/python-modules/tokenserver/default.nix
+++ b/pkgs/development/python-modules/tokenserver/default.nix
@@ -1,32 +1,35 @@
-{ buildPythonPackage
-, fetchgit
-, testfixtures
-, cornice
-, mozsvc
-, pybrowserid
-, tokenlib
-, pymysql
-, umemcache
-, hawkauthlib
-, alembic
-, pymysqlsa
-, paste
-, boto
+{ lib, buildPythonPackage, fetchFromGitHub
+, alembic, boto, cornice, hawkauthlib, mozsvc, paste, pybrowserid, pyfxa
+, pymysql, pymysqlsa, sqlalchemy, testfixtures, tokenlib, umemcache
+, mock, nose, unittest2, webtest
 }:
 
 buildPythonPackage rec {
   pname = "tokenserver";
-  version = "1.2.27";
+  version = "1.3.1";
 
-  src = fetchgit {
-    url = https://github.com/mozilla-services/tokenserver.git;
-    rev = "refs/tags/${version}";
-    sha256 = "0il3bgjld495g9gxvvrm56kpan5swaizzg216qz3zxmb6w9ly3fm";
+  src = fetchFromGitHub {
+    owner = "mozilla-services";
+    repo = pname;
+    rev = version;
+    sha256 = "04z0r8xzrmhvh04y8ggdz9gs8qa8lv3qr7kasf6lm63fixsfgrlp";
   };
 
+  propagatedBuildInputs = [
+    alembic boto cornice hawkauthlib mozsvc paste pybrowserid pyfxa
+    pymysql pymysqlsa sqlalchemy testfixtures tokenlib umemcache
+  ];
+
+  checkInputs = [
+    mock nose unittest2 webtest
+  ];
+
+  # Requires virtualenv, MySQL, ...
   doCheck = false;
-  checkInputs = [ testfixtures ];
-  propagatedBuildInputs = [ cornice mozsvc pybrowserid tokenlib
-    pymysql umemcache hawkauthlib alembic pymysqlsa paste boto ];
 
+  meta = with lib; {
+    description = "The Mozilla Token Server";
+    homepage = https://github.com/mozilla-services/tokenserver;
+    license = licenses.mpl20;
+  };
 }