btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / development / python-modules / testcontainers / default.nix
blob73cd3f3dcbfc7151e414671a005aa5786909d86b
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
6   # build-system
7   poetry-core,
9   # buildInputs
10   deprecation,
11   docker,
12   wrapt,
14   # dependencies
15   typing-extensions,
18 buildPythonPackage rec {
19   pname = "testcontainers";
20   version = "4.8.2";
21   pyproject = true;
23   src = fetchFromGitHub {
24     owner = "testcontainers";
25     repo = "testcontainers-python";
26     rev = "refs/tags/testcontainers-v${version}";
27     hash = "sha256-cfvhTNUadx7zRmDPAv9Djsx+jWgBIAf9dMmwop/8oa0=";
28   };
30   postPatch = ''
31     echo "${version}" > VERSION
32   '';
34   build-system = [ poetry-core ];
36   buildInputs = [
37     deprecation
38     docker
39     wrapt
40   ];
42   dependencies = [ typing-extensions ];
44   # Tests require various container and database services running
45   doCheck = false;
47   pythonImportsCheck = [ "testcontainers" ];
49   meta = {
50     description = "Allows using docker containers for functional and integration testing";
51     homepage = "https://github.com/testcontainers/testcontainers-python";
52     changelog = "https://github.com/testcontainers/testcontainers-python/releases/tag/testcontainers-v${version}";
53     license = lib.licenses.asl20;
54     maintainers = with lib.maintainers; [ onny ];
55   };