2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# build-system
|
|
|
|
setuptools,
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# dependencies
|
|
|
|
argon2-cffi,
|
|
|
|
certifi,
|
|
|
|
urllib3,
|
|
|
|
pycryptodome,
|
|
|
|
typing-extensions,
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# test
|
|
|
|
faker,
|
|
|
|
mock,
|
|
|
|
pytestCheckHook,
|
2020-06-18 07:06:33 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "minio";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "7.2.7";
|
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-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-Qb3KPwSODtIqwS4FfR+DHphx4duPsNdMlHt2rpdV2+Y=";
|
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-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-01-13 08:15:51 +00:00
|
|
|
|
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"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +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;
|
|
|
|
};
|
|
|
|
}
|