about 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/konfig/default.nix17
1 files changed, 13 insertions, 4 deletions
diff --git a/pkgs/development/python-modules/konfig/default.nix b/pkgs/development/python-modules/konfig/default.nix
index aba97c7204e3..e7062bad5ee7 100644
--- a/pkgs/development/python-modules/konfig/default.nix
+++ b/pkgs/development/python-modules/konfig/default.nix
@@ -1,4 +1,4 @@
-{ lib, buildPythonPackage, fetchPypi, isPy3k, writeText, configparser, six }:
+{ lib, buildPythonPackage, fetchFromGitHub, isPy3k, writeText, configparser, six, pytest, glibcLocales }:
 
 buildPythonPackage rec {
   pname = "konfig";
@@ -8,9 +8,12 @@ buildPythonPackage rec {
   # the standard library in python 3.2 or above.
   disabled = isPy3k;
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "7aa4c6463d6c13f4c98c02a998cbef4729da9ad69b676627acc8d3b3efb02b57";
+  # PyPI tarball is missing utf8.ini, required for tests
+  src = fetchFromGitHub {
+    owner = "mozilla-services";
+    repo = pname;
+    rev = version;
+    sha256 = "1h780fbrv275dcik4cs3rincza805z6q726b48r4a0qmh5d8160c";
   };
 
   propagatedBuildInputs = [ configparser six ];
@@ -31,6 +34,12 @@ buildPythonPackage rec {
            classifiers=classifiers,
   '') ];
 
+  checkInputs = [ pytest glibcLocales ];
+
+  checkPhase = ''
+    LC_ALL=en_US.utf8 pytest -v konfig/tests
+  '';
+
   meta = with lib; {
     description = "Yet Another Config Parser";
     homepage    = "https://github.com/mozilla-services/konfig";