From 0862ca375c97d30aba8bb724f4f4358eba73de68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 22 Feb 2018 01:22:48 +0100 Subject: [PATCH] pythonPackages.konfig: fix tests --- .../python-modules/konfig/default.nix | 17 +++++++++++++---- 1 file 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";