From d322a5b3ec58a3b0bcebb55bec0aa8c491f80d95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 19 Feb 2018 17:58:23 +0100 Subject: [PATCH] pythonPackages.bibtexparser: enable tests --- .../python-modules/bibtexparser/default.nix | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/bibtexparser/default.nix b/pkgs/development/python-modules/bibtexparser/default.nix index 72bc68358323..06d7c689e659 100644 --- a/pkgs/development/python-modules/bibtexparser/default.nix +++ b/pkgs/development/python-modules/bibtexparser/default.nix @@ -1,23 +1,31 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub , pyparsing , future +, nose +, glibcLocales }: buildPythonPackage rec { pname = "bibtexparser"; version = "1.0.1"; - src = fetchPypi { - inherit pname version; - sha256 = "cc41cdd8332c2bf44b97daf1f135f4f267c3b744c33976655cd270b66f964c0a"; + # PyPI tarball does not ship tests + src = fetchFromGitHub { + owner = "sciunto-org"; + repo = "python-${pname}"; + rev = "v${version}"; + sha256 = "0lmlarkfbq2hp1wa04a62245jr2mqizqsdlgilj5aq6vy92gr6ai"; }; propagatedBuildInputs = [ pyparsing future ]; - # No tests in archive - doCheck = false; + checkInputs = [ nose glibcLocales ]; + + checkPhase = '' + LC_ALL="en_US.UTF-8" nosetests + ''; meta = { description = "Bibtex parser for python 2.7 and 3.3 and newer";