summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pytest-smtpd/default.nix
blob: eb15b0a2e4366f051bc36f08d5125dffca5659b0 (plain)
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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  hatchling,
  pytest,
  smtpdfix,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "pytest-smtpd";
  version = "0.1.0";
  pyproject = true;

  # Pypi tarball doesn't include tests/
  src = fetchFromGitHub {
    owner = "bebleo";
    repo = "pytest-smtpd";
    tag = "v${version}";
    hash = "sha256-Vu2D2hfxBYxgXQ4Gjr+jFpac9fjpLL2FftBhnqrcQaA=";
  };

  build-system = [ hatchling ];

  dependencies = [
    smtpdfix
  ];

  buildInputs = [ pytest ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "pytest_smtpd" ];

  meta = {
    description = "Pytest fixture that creates an SMTP server";
    homepage = "https://github.com/bebleo/pytest-smtpd";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ erictapen ];
  };
}