2022-07-18 16:21:45 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2024-04-21 15:54:59 +00:00
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
|
|
|
, poetry-core
|
2022-07-18 16:21:45 +00:00
|
|
|
, deprecation
|
|
|
|
, docker
|
2024-04-21 15:54:59 +00:00
|
|
|
, wrapt
|
|
|
|
, typing-extensions
|
|
|
|
}:
|
2022-07-18 16:21:45 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "testcontainers";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "4.3.3";
|
|
|
|
disabled = pythonOlder "3.9";
|
2022-07-18 16:21:45 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
2023-03-24 00:07:29 +00:00
|
|
|
|
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}";
|
|
|
|
hash = "sha256-qb7mOtL+YJI24DOBgrqxc817k4fD2kTOtUNF2X0qEIc=";
|
2022-07-18 16:21:45 +00:00
|
|
|
};
|
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
postPatch = ''
|
|
|
|
echo "${version}" > VERSION
|
|
|
|
'';
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
2022-07-18 16:21:45 +00:00
|
|
|
buildInputs = [
|
|
|
|
deprecation
|
|
|
|
docker
|
|
|
|
wrapt
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies = [
|
|
|
|
typing-extensions
|
|
|
|
];
|
|
|
|
|
2022-07-18 16:21:45 +00:00
|
|
|
# Tests require various container and database services running
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"testcontainers"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2022-08-12 12:06:08 +00:00
|
|
|
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";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ onny ];
|
|
|
|
};
|
|
|
|
}
|