2022-01-07 10:36:49 +00:00
|
|
|
{ lib
|
|
|
|
, antlr4-python3-runtime
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, importlib-resources
|
|
|
|
, jre_headless
|
|
|
|
, omegaconf
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
2020-01-10 03:34:07 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "hydra";
|
2021-08-19 02:04:56 +01:00
|
|
|
version = "1.1.1";
|
2022-01-07 10:36:49 +00:00
|
|
|
format = "setuptools";
|
2021-08-19 02:04:56 +01:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-01-10 03:34:07 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "facebookresearch";
|
|
|
|
repo = pname;
|
2021-08-19 02:04:56 +01:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256:1svzysrjg47gb6lxx66fzd8wbhpbbsppprpbqssf5aqvhxgay3qk";
|
2020-01-10 03:34:07 +00:00
|
|
|
};
|
|
|
|
|
2022-01-07 10:36:49 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
jre_headless
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
antlr4-python3-runtime
|
|
|
|
omegaconf
|
|
|
|
] ++ lib.optionals (pythonOlder "3.9") [
|
|
|
|
importlib-resources
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-01-10 03:34:07 +00:00
|
|
|
|
2022-01-07 10:36:49 +00:00
|
|
|
# Test environment setup broken under Nix for a few tests:
|
2021-08-19 02:04:56 +01:00
|
|
|
disabledTests = [
|
|
|
|
"test_bash_completion_with_dot_in_path"
|
|
|
|
"test_install_uninstall"
|
2022-01-07 10:36:49 +00:00
|
|
|
"test_config_search_path"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
"tests/test_hydra.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"hydra"
|
2021-08-19 02:04:56 +01:00
|
|
|
];
|
2020-01-10 03:34:07 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A framework for configuring complex applications";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://hydra.cc";
|
2020-01-10 03:34:07 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
|
|
|
};
|
|
|
|
}
|