1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 setuptools-scm,
7 brotli,
8 inflate64,
9 multivolumefile,
10 psutil,
11 pybcj,
12 pycryptodomex,
13 pyppmd,
14 pyzstd,
15 texttable,
16 py-cpuinfo,
17 pytest-benchmark,
18 pytest-httpserver,
19 pytest-remotedata,
20 pytest-timeout,
21 pytestCheckHook,
22 requests,
23}:
24
25buildPythonPackage rec {
26 pname = "py7zr";
27 version = "1.0.0";
28 pyproject = true;
29
30 src = fetchFromGitHub {
31 owner = "miurahr";
32 repo = "py7zr";
33 tag = "v${version}";
34 hash = "sha256-uV4zBQZlHfHgM/NiVSjI5I9wJRk9i4ihJn4B2R6XRuM=";
35 };
36
37 build-system = [
38 setuptools
39 setuptools-scm
40 ];
41
42 dependencies = [
43 brotli
44 inflate64
45 multivolumefile
46 psutil
47 pybcj
48 pycryptodomex
49 pyppmd
50 pyzstd
51 texttable
52 ];
53
54 nativeCheckInputs = [
55 py-cpuinfo
56 pytest-benchmark
57 pytest-httpserver
58 pytest-remotedata
59 pytest-timeout
60 pytestCheckHook
61 requests
62 ];
63
64 pytestFlags = [ "--benchmark-disable" ];
65
66 pythonImportsCheck = [
67 "py7zr"
68 ];
69
70 meta = {
71 description = "7zip in Python 3 with ZStandard, PPMd, LZMA2, LZMA1, Delta, BCJ, BZip2";
72 homepage = "https://github.com/miurahr/py7zr";
73 changelog = "https://github.com/miurahr/py7zr/blob/v${version}/docs/Changelog.rst#v${
74 builtins.replaceStrings [ "." ] [ "" ] version
75 }";
76 license = lib.licenses.gpl2Only;
77 maintainers = with lib.maintainers; [
78 pitkling
79 PopeRigby
80 ];
81 };
82}