From 51d4dc261922c4cfa1f4c40932264df5650b8d1e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 28 Feb 2021 12:14:36 +0100 Subject: [PATCH] python3Packages.identify: enable tests --- .../python-modules/identify/default.nix | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/identify/default.nix b/pkgs/development/python-modules/identify/default.nix index 7da30166eda..cb4d538da3d 100644 --- a/pkgs/development/python-modules/identify/default.nix +++ b/pkgs/development/python-modules/identify/default.nix @@ -1,22 +1,33 @@ -{ lib, buildPythonPackage, fetchPypi }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, editdistance +}: buildPythonPackage rec { pname = "identify"; version = "1.6.1"; - src = fetchPypi { - inherit pname version; - sha256 = "7b435803dc79a0f0ce887887a62ad360f3a9e8162ac0db9ee649d5d24085bf30"; + + src = fetchFromGitHub { + owner = "pre-commit"; + repo = pname; + rev = "v${version}"; + sha256 = "1sqhqqjp53dwm8yq4nrgggxbvzs3szbg49z5sj2ss9xzlgmimclm"; }; - pythonImportsCheck = [ "identify" ]; + checkInputs = [ + editdistance + pytestCheckHook + ]; - # Tests not included in PyPI tarball - doCheck = false; + pythonImportsCheck = [ "identify" ]; meta = with lib; { description = "File identification library for Python"; homepage = "https://github.com/chriskuehl/identify"; license = licenses.mit; + maintainers = with maintainers; [ fab ]; }; }