2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
deprecation,
|
|
|
|
docker,
|
|
|
|
wrapt,
|
|
|
|
typing-extensions,
|
2024-04-21 15:54:59 +00:00
|
|
|
}:
|
2022-07-18 16:21:45 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "testcontainers";
|
2024-07-01 15:47:52 +00:00
|
|
|
version = "4.7.0";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
2023-03-24 00:07:29 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
2022-07-18 16:21:45 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "testcontainers";
|
|
|
|
repo = "testcontainers-python";
|
2024-04-21 15:54:59 +00:00
|
|
|
rev = "refs/tags/testcontainers-v${version}";
|
2024-07-01 15:47:52 +00:00
|
|
|
hash = "sha256-DX2s3Z3QM8qzUr5nM+9erJG/XHkB96h8S4+KYDfcA8A=";
|
2022-07-18 16:21:45 +00:00
|
|
|
};
|
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
postPatch = ''
|
|
|
|
echo "${version}" > VERSION
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ poetry-core ];
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2022-07-18 16:21:45 +00:00
|
|
|
buildInputs = [
|
|
|
|
deprecation
|
|
|
|
docker
|
|
|
|
wrapt
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
dependencies = [ typing-extensions ];
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2022-07-18 16:21:45 +00:00
|
|
|
# Tests require various container and database services running
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "testcontainers" ];
|
2022-07-18 16:21:45 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
meta = {
|
|
|
|
description = "Allows using docker containers for functional and integration testing";
|
2022-07-18 16:21:45 +00:00
|
|
|
homepage = "https://github.com/testcontainers/testcontainers-python";
|
2024-07-01 15:47:52 +00:00
|
|
|
changelog = "https://github.com/testcontainers/testcontainers-python/releases/tag/testcontainers-v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
license = lib.licenses.asl20;
|
|
|
|
maintainers = with lib.maintainers; [ onny ];
|
2022-07-18 16:21:45 +00:00
|
|
|
};
|
|
|
|
}
|