writers: add writeGuile[Bin] (#364531)
[NixPkgs.git] / pkgs / development / python-modules / omegaconf / default.nix
blob4386f2170c2f81941447743050437cb5b27c6096
2   lib,
3   antlr4,
4   antlr4-python3-runtime,
5   attrs,
6   buildPythonPackage,
7   fetchFromGitHub,
8   setuptools,
9   jre_minimal,
10   pydevd,
11   pytest-mock,
12   pytestCheckHook,
13   pythonOlder,
14   pyyaml,
15   substituteAll,
18 buildPythonPackage rec {
19   pname = "omegaconf";
20   version = "2.3.0";
21   pyproject = true;
23   disabled = pythonOlder "3.6";
25   src = fetchFromGitHub {
26     owner = "omry";
27     repo = "omegaconf";
28     rev = "refs/tags/v${version}";
29     hash = "sha256-Qxa4uIiX5TAyQ5rFkizdev60S4iVAJ08ES6FpNqf8zI=";
30   };
32   patches = [
33     (substituteAll {
34       src = ./antlr4.patch;
35       antlr_jar = "${antlr4.out}/share/java/antlr-${antlr4.version}-complete.jar";
36     })
38     # https://github.com/omry/omegaconf/pull/1137
39     ./0000-add-support-for-dataclasses_missing_type.patch
40   ];
42   postPatch = ''
43     # We substitute the path to the jar with the one from our antlr4
44     # package, so this file becomes unused
45     rm -v build_helpers/bin/antlr*-complete.jar
47     sed -i 's/antlr4-python3-runtime==.*/antlr4-python3-runtime/' requirements/base.txt
48   '';
50   build-system = [ setuptools ];
52   nativeBuildInputs = [ jre_minimal ];
54   dependencies = [
55     antlr4-python3-runtime
56     pyyaml
57   ];
59   nativeCheckInputs = [
60     attrs
61     pydevd
62     pytest-mock
63     pytestCheckHook
64   ];
66   pythonImportsCheck = [ "omegaconf" ];
68   pytestFlagsArray = [
69     "-W"
70     "ignore::DeprecationWarning"
71   ];
73   disabledTests = [ "test_eq" ];
75   meta = with lib; {
76     description = "Framework for configuring complex applications";
77     homepage = "https://github.com/omry/omegaconf";
78     changelog = "https://github.com/omry/omegaconf/blob/v${version}/NEWS.md";
79     license = licenses.bsd3;
80     maintainers = with maintainers; [ bcdarwin ];
81   };