1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6
7 # build-system
8 setuptools,
9
10 # dependencies
11 argon2-cffi,
12 certifi,
13 urllib3,
14 pycryptodome,
15 typing-extensions,
16
17 # test
18 faker,
19 mock,
20 pytestCheckHook,
21}:
22
23buildPythonPackage rec {
24 pname = "minio";
25 version = "7.2.17";
26 pyproject = true;
27
28 disabled = pythonOlder "3.8";
29
30 src = fetchFromGitHub {
31 owner = "minio";
32 repo = "minio-py";
33 tag = version;
34 hash = "sha256-SP681EBKSyLl9V1TaI/7jsQOLPKKI+XwkR6hpoaSG/Y=";
35 };
36
37 postPatch = ''
38 substituteInPlace tests/unit/crypto_test.py \
39 --replace-fail "assertEquals" "assertEqual"
40 '';
41
42 build-system = [ setuptools ];
43
44 dependencies = [
45 argon2-cffi
46 certifi
47 urllib3
48 pycryptodome
49 typing-extensions
50 ];
51
52 nativeCheckInputs = [
53 faker
54 mock
55 pytestCheckHook
56 ];
57
58 disabledTestPaths = [
59 # example credentials aren't present
60 "tests/unit/credentials_test.py"
61 ];
62
63 pythonImportsCheck = [ "minio" ];
64
65 meta = with lib; {
66 description = "Simple APIs to access any Amazon S3 compatible object storage server";
67 homepage = "https://github.com/minio/minio-py";
68 changelog = "https://github.com/minio/minio-py/releases/tag/${src.tag}";
69 maintainers = with maintainers; [ peterromfeldhk ];
70 license = licenses.asl20;
71 };
72}