summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/serverlessrepo/default.nix
blob: 39fce6c05da020e6b4f73041152edb6132e67f51 (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,
  fetchPypi,
  pytestCheckHook,
  boto3,
  six,
  pyyaml,
  mock,
}:

buildPythonPackage rec {
  pname = "serverlessrepo";
  version = "0.1.10";
  format = "setuptools";

  src = fetchPypi {
    inherit pname version;
    sha256 = "671f48038123f121437b717ed51f253a55775590f00fbab6fbc6a01f8d05c017";
  };

  propagatedBuildInputs = [
    six
    boto3
    pyyaml
  ];

  nativeCheckInputs = [
    pytestCheckHook
    mock
  ];

  postPatch = ''
    substituteInPlace setup.py \
      --replace "pyyaml~=5.1" "pyyaml" \
      --replace "boto3~=1.9, >=1.9.56" "boto3"
  '';

  enabledTestPaths = [ "tests/unit" ];

  pythonImportsCheck = [ "serverlessrepo" ];

  meta = {
    homepage = "https://github.com/awslabs/aws-serverlessrepo-python";
    description = "Helpers for working with the AWS Serverless Application Repository";
    longDescription = ''
      A Python library with convenience helpers for working with the
      AWS Serverless Application Repository.
    '';
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ dhkl ];
  };
}