Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / omegaconf / default.nix
blob445d15f439401a775e6af0eb617f9ea0df1d108f
1 { lib
2 , antlr4
3 , antlr4-python3-runtime
4 , attrs
5 , buildPythonPackage
6 , fetchFromGitHub
7 , setuptools
8 , jre_minimal
9 , pydevd
10 , pytest-mock
11 , pytestCheckHook
12 , pythonOlder
13 , pyyaml
14 , substituteAll
17 buildPythonPackage rec {
18   pname = "omegaconf";
19   version = "2.3.0";
20   pyproject = true;
22   disabled = pythonOlder "3.6";
24   src = fetchFromGitHub {
25     owner = "omry";
26     repo = "omegaconf";
27     rev = "refs/tags/v${version}";
28     hash = "sha256-Qxa4uIiX5TAyQ5rFkizdev60S4iVAJ08ES6FpNqf8zI=";
29   };
31   patches = [
32     (substituteAll {
33       src = ./antlr4.patch;
34       antlr_jar = "${antlr4.out}/share/java/antlr-${antlr4.version}-complete.jar";
35     })
37     # https://github.com/omry/omegaconf/pull/1137
38     ./0000-add-support-for-dataclasses_missing_type.patch
39   ];
41   postPatch = ''
42     # We substitute the path to the jar with the one from our antlr4
43     # package, so this file becomes unused
44     rm -v build_helpers/bin/antlr*-complete.jar
46     sed -i 's/antlr4-python3-runtime==.*/antlr4-python3-runtime/' requirements/base.txt
47   '';
49   build-system = [
50     setuptools
51   ];
53   nativeBuildInputs = [
54     jre_minimal
55   ];
57   dependencies = [
58     antlr4-python3-runtime
59     pyyaml
60   ];
62   nativeCheckInputs = [
63     attrs
64     pydevd
65     pytest-mock
66     pytestCheckHook
67   ];
69   pythonImportsCheck = [
70     "omegaconf"
71   ];
73   pytestFlagsArray = [
74     "-W"
75     "ignore::DeprecationWarning"
76   ];
78   disabledTests = [
79     "test_eq"
80   ];
82   meta = with lib; {
83     description = "Framework for configuring complex applications";
84     homepage = "https://github.com/omry/omegaconf";
85     changelog = "https://github.com/omry/omegaconf/blob/v${version}/NEWS.md";
86     license = licenses.bsd3;
87     maintainers = with maintainers; [ bcdarwin ];
88   };