nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pytestCheckHook,
6 boto3,
7 six,
8 pyyaml,
9 mock,
10}:
11
12buildPythonPackage rec {
13 pname = "serverlessrepo";
14 version = "0.1.10";
15 format = "setuptools";
16
17 src = fetchPypi {
18 inherit pname version;
19 sha256 = "671f48038123f121437b717ed51f253a55775590f00fbab6fbc6a01f8d05c017";
20 };
21
22 propagatedBuildInputs = [
23 six
24 boto3
25 pyyaml
26 ];
27
28 nativeCheckInputs = [
29 pytestCheckHook
30 mock
31 ];
32
33 postPatch = ''
34 substituteInPlace setup.py \
35 --replace "pyyaml~=5.1" "pyyaml" \
36 --replace "boto3~=1.9, >=1.9.56" "boto3"
37 '';
38
39 enabledTestPaths = [ "tests/unit" ];
40
41 pythonImportsCheck = [ "serverlessrepo" ];
42
43 meta = {
44 homepage = "https://github.com/awslabs/aws-serverlessrepo-python";
45 description = "Helpers for working with the AWS Serverless Application Repository";
46 longDescription = ''
47 A Python library with convenience helpers for working with the
48 AWS Serverless Application Repository.
49 '';
50 license = lib.licenses.asl20;
51 maintainers = with lib.maintainers; [ dhkl ];
52 };
53}