summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/sslpsk-pmd3/default.nix
blob: e65aca82a7f9b00f547f019348f73e201c72e1d3 (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
43
44
45
46
47
48
49
50
51
52
53
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  openssl,
  pytestCheckHook,
  setuptools,
  setuptools-scm,
}:

buildPythonPackage rec {
  pname = "sslpsk-pmd3";
  version = "1.0.3";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "doronz88";
    repo = "sslpsk-pmd3";
    tag = "v${version}";
    hash = "sha256-ZOPrMZhtHIpE7QMEYGti+ZjqVv93jzb74rG5Fwhjgyw=";
  };

  build-system = [
    setuptools
    setuptools-scm
  ];

  buildInputs = [
    openssl
  ];

  pythonImportsCheck = [ "sslpsk_pmd3" ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  preCheck = ''
    # import from $out
    mv sslpsk_pmd3 src
  '';

  # tests are dysfunctional
  doCheck = false;

  meta = {
    changelog = "https://github.com/doronz88/sslpsk-pmd3/releases/tag/${src.tag}";
    description = "Adds TLS-PSK support to the Python ssl package";
    homepage = "https://github.com/doronz88/sslpsk-pmd3";
    license = lib.licenses.asl20;
    maintainers = [ lib.maintainers.dotlambda ];
  };
}