1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 pythonOlder,
7 cffi,
8 setuptools,
9 ukkonen,
10}:
11
12buildPythonPackage rec {
13 pname = "identify";
14 version = "2.6.14";
15 pyproject = true;
16
17 disabled = pythonOlder "3.9";
18
19 src = fetchFromGitHub {
20 owner = "pre-commit";
21 repo = "identify";
22 tag = "v${version}";
23 hash = "sha256-l486vlvhDEm9f11z1FDB9AxAbQ+jgHvGppn4CTc/dLk=";
24 };
25
26 build-system = [ setuptools ];
27
28 dependencies = [
29 cffi
30 pytestCheckHook
31 ukkonen
32 ];
33
34 pythonImportsCheck = [ "identify" ];
35
36 meta = {
37 description = "File identification library for Python";
38 homepage = "https://github.com/pre-commit/identify";
39 license = lib.licenses.mit;
40 maintainers = with lib.maintainers; [ fab ];
41 mainProgram = "identify-cli";
42 };
43}