about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/testcontainers/default.nix
blob: 8450fcde11262e8250516770a6c57d519375ca1d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{ lib
, fetchFromGitHub
, buildPythonPackage
, deprecation
, docker
, wrapt }:

buildPythonPackage rec {
  pname = "testcontainers";
  version = "4.0.0";

  format = "setuptools";

  src = fetchFromGitHub {
    owner = "testcontainers";
    repo = "testcontainers-python";
    rev = "refs/tags/testcontainers-v${version}";
    hash = "sha256-cVVP9nGRTLC09KHalQDz7KOszjuFVVpMlee4btPNgd4=";
  };

  postPatch = ''
    echo "${version}" > VERSION
  '';

  buildInputs = [
    deprecation
    docker
    wrapt
  ];

  # Tests require various container and database services running
  doCheck = false;

  pythonImportsCheck = [
    "testcontainers"
  ];

  meta = with lib; {
    description = ''
      Allows using docker containers for functional and integration testing
    '';
    homepage = "https://github.com/testcontainers/testcontainers-python";
    license = licenses.asl20;
    maintainers = with maintainers; [ onny ];
  };
}