From 1e3416cc0a3454ade851ad420eca61a971327c18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 25 Apr 2017 23:22:53 +0200 Subject: [PATCH] pythonPackages.ezdxf: fix tests --- .../development/python-modules/ezdxf/default.nix | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/ezdxf/default.nix b/pkgs/development/python-modules/ezdxf/default.nix index 18e8e98315cc..6b0484f2c366 100644 --- a/pkgs/development/python-modules/ezdxf/default.nix +++ b/pkgs/development/python-modules/ezdxf/default.nix @@ -1,17 +1,19 @@ -{ stdenv, buildPythonPackage, fetchurl, isPy3k, pyparsing }: +{ stdenv, buildPythonPackage, fetchFromGitHub, pyparsing, pytest }: buildPythonPackage rec { version = "0.8.1"; name = "ezdxf-${version}"; - src = fetchurl { - url = "mirror://pypi/e/ezdxf/${name}.zip"; - sha256 = "1q4la4h7840wb8l2jf39wy68gq5jwymkghb1a1mg8qblj424130k"; + src = fetchFromGitHub { + owner = "mozman"; + repo = "ezdxf"; + rev = "v${version}"; + sha256 = "1c20j96n3rsgzaakfjl0wnydaj2qr69gbnnjs6mfa1hz2fjqri22"; }; - # Tests fail on Python 3.x, but module imports and works - doCheck = !(isPy3k); - + buildInputs = [ pytest ]; + checkPhase = "python -m unittest discover -s tests"; + propagatedBuildInputs = [ pyparsing ]; meta = with stdenv.lib; {