nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 httpx,
6 pydantic,
7 pytestCheckHook,
8 setuptools,
9}:
10
11buildPythonPackage rec {
12 pname = "pycfmodel";
13 version = "1.2.0";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "Skyscanner";
18 repo = "pycfmodel";
19 tag = "v${version}";
20 hash = "sha256-ta6kS+MiSa2DZx18EQr7hvWYrK55j48hSBACtcklCpI=";
21 };
22
23 pythonRelaxDeps = [ "pydantic" ];
24
25 build-system = [ setuptools ];
26
27 dependencies = [ pydantic ];
28
29 nativeCheckInputs = [
30 httpx
31 pytestCheckHook
32 ];
33
34 disabledTests = [
35 # Test require network access
36 "test_cloudformation_actions"
37 "test_auxiliar_cast"
38 "test_valid_es_domain_from_aws_documentation_examples_resource_can_be_built"
39 "test_valid_opensearch_domain_from_aws_documentation_examples_resource_can_be_built"
40 "test_resolve_booleans_different_properties_for_generic_resource"
41 "test_loose_ip"
42 "test_extra_fields_not_allowed_s3_bucket"
43 "test_raise_error_if_invalid_fields_in_resource"
44 ];
45
46 pythonImportsCheck = [ "pycfmodel" ];
47
48 meta = {
49 description = "Model for Cloud Formation scripts";
50 homepage = "https://github.com/Skyscanner/pycfmodel";
51 changelog = "https://github.com/Skyscanner/pycfmodel/releases/tag/${src.tag}";
52 license = lib.licenses.asl20;
53 maintainers = with lib.maintainers; [ fab ];
54 };
55}