about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/coveralls/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/coveralls/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/coveralls/default.nix58
1 files changed, 58 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/coveralls/default.nix b/nixpkgs/pkgs/development/python-modules/coveralls/default.nix
new file mode 100644
index 000000000000..cda30943b0e4
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/coveralls/default.nix
@@ -0,0 +1,58 @@
+{ buildPythonPackage
+, lib
+, fetchPypi
+, mock
+, pytest
+, pytestrunner
+, sh
+, coverage
+, docopt
+, requests
+, urllib3
+, git
+, isPy3k
+}:
+
+buildPythonPackage rec {
+  pname = "coveralls";
+  name = "${pname}-python-${version}";
+  version = "1.5.1";
+
+  # wanted by tests
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "ab638e88d38916a6cedbf80a9cd8992d5fa55c77ab755e262e00b36792b7cd6d";
+  };
+
+  checkInputs = [
+    mock
+    sh
+    pytest
+    git
+  ];
+
+  buildInputs = [
+    pytestrunner
+  ];
+
+  # FIXME: tests requires .git directory to be present
+  doCheck = false;
+
+  checkPhase = ''
+    python setup.py test
+  '';
+
+  propagatedBuildInputs = [
+    coverage
+    docopt
+    requests
+  ] ++ lib.optional (!isPy3k) urllib3;
+
+  meta = {
+    description = "Show coverage stats online via coveralls.io";
+    homepage = https://github.com/coveralls-clients/coveralls-python;
+    license = lib.licenses.mit;
+  };
+}
+
+