1{ lib
2, buildPythonPackage
3, editdistance-s
4, fetchFromGitHub
5, pytestCheckHook
6, pythonOlder
7, ukkonen
8}:
9
10buildPythonPackage rec {
11 pname = "identify";
12 version = "2.5.9";
13 format = "setuptools";
14
15 disabled = pythonOlder "3.7";
16
17 src = fetchFromGitHub {
18 owner = "pre-commit";
19 repo = pname;
20 rev = "v${version}";
21 sha256 = "sha256-5ISxzOTTlA1EcBO5N6YtBEah0SRehGeVIONj30zOKk0=";
22 };
23
24 checkInputs = [
25 editdistance-s
26 pytestCheckHook
27 ukkonen
28 ];
29
30 pythonImportsCheck = [
31 "identify"
32 ];
33
34 meta = with lib; {
35 description = "File identification library for Python";
36 homepage = "https://github.com/chriskuehl/identify";
37 license = licenses.mit;
38 maintainers = with maintainers; [ fab ];
39 };
40}