2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2024-01-13 08:15:51 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
|
|
|
|
|
|
|
# build-system
|
|
|
|
, setuptools
|
|
|
|
|
|
|
|
# dependencies
|
|
|
|
, argon2-cffi
|
2021-06-28 23:13:55 +00:00
|
|
|
, certifi
|
2024-01-13 08:15:51 +00:00
|
|
|
, urllib3
|
|
|
|
, pycryptodome
|
2024-04-21 15:54:59 +00:00
|
|
|
, typing-extensions
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
# test
|
2020-06-18 07:06:33 +00:00
|
|
|
, faker
|
|
|
|
, mock
|
2021-06-28 23:13:55 +00:00
|
|
|
, pytestCheckHook
|
2020-06-18 07:06:33 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "minio";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "7.2.5";
|
2024-01-13 08:15:51 +00:00
|
|
|
pyproject = true;
|
2021-12-30 13:39:12 +00:00
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "minio";
|
|
|
|
repo = "minio-py";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-Xb6XaGI/bwkhp6YKgoqi5Tbs74pSXc6aJpWVUgG5uR4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace tests/unit/crypto_test.py \
|
|
|
|
--replace-fail "assertEquals" "assertEqual"
|
|
|
|
'';
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
propagatedBuildInputs = [
|
2024-01-13 08:15:51 +00:00
|
|
|
argon2-cffi
|
2021-06-28 23:13:55 +00:00
|
|
|
certifi
|
2020-06-18 07:06:33 +00:00
|
|
|
urllib3
|
2024-01-13 08:15:51 +00:00
|
|
|
pycryptodome
|
2024-04-21 15:54:59 +00:00
|
|
|
typing-extensions
|
2020-06-18 07:06:33 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-06-28 23:13:55 +00:00
|
|
|
faker
|
|
|
|
mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
2021-12-30 13:39:12 +00:00
|
|
|
# example credentials aren't present
|
2021-06-28 23:13:55 +00:00
|
|
|
"tests/unit/credentials_test.py"
|
|
|
|
];
|
|
|
|
|
2021-12-30 13:39:12 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"minio"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Simple APIs to access any Amazon S3 compatible object storage server";
|
|
|
|
homepage = "https://github.com/minio/minio-py";
|
2023-01-11 07:51:40 +00:00
|
|
|
changelog = "https://github.com/minio/minio-py/releases/tag/${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ peterromfeldhk ];
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|