1{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder, pytestCheckHook
2, importlib-resources, omegaconf, jre_headless, antlr4-python3-runtime }:
3
4buildPythonPackage rec {
5 pname = "hydra";
6 version = "1.1.1";
7
8 disabled = pythonOlder "3.6";
9
10 src = fetchFromGitHub {
11 owner = "facebookresearch";
12 repo = pname;
13 rev = "v${version}";
14 sha256 = "sha256:1svzysrjg47gb6lxx66fzd8wbhpbbsppprpbqssf5aqvhxgay3qk";
15 };
16
17 nativeBuildInputs = [ jre_headless ];
18 checkInputs = [ pytestCheckHook ];
19 propagatedBuildInputs = [ omegaconf antlr4-python3-runtime ]
20 ++ lib.optionals (pythonOlder "3.9") [ importlib-resources ];
21
22 # test environment setup broken under Nix for a few tests:
23 disabledTests = [
24 "test_bash_completion_with_dot_in_path"
25 "test_install_uninstall"
26 ];
27 disabledTestPaths = [ "tests/test_hydra.py" ];
28
29 meta = with lib; {
30 description = "A framework for configuring complex applications";
31 homepage = "https://hydra.cc";
32 license = licenses.mit;
33 maintainers = with maintainers; [ bcdarwin ];
34 };
35}