2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
2022-01-19 23:45:15 +00:00
|
|
|
, python3
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
2022-03-30 09:31:56 +00:00
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
, enableGoogle ? false
|
|
|
|
, enableAWS ? false
|
|
|
|
, enableAzure ? false
|
|
|
|
, enableSSH ? false
|
|
|
|
}:
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "dvc";
|
2023-08-04 22:07:22 +00:00
|
|
|
version = "3.8.1";
|
2023-05-24 13:37:59 +00:00
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "iterative";
|
2022-01-19 23:45:15 +00:00
|
|
|
repo = pname;
|
2023-05-24 13:37:59 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-08-04 22:07:22 +00:00
|
|
|
hash = "sha256-ZHB2XAYjPwhCWHqq2Kro4CzDW34YBaknv9xBotCDkOw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"dvc-data"
|
|
|
|
"platformdirs"
|
|
|
|
];
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
postPatch = ''
|
2023-08-04 22:07:22 +00:00
|
|
|
substituteInPlace dvc/analytics.py --replace 'enabled = not os.getenv(DVC_NO_ANALYTICS)' 'enabled = False'
|
2022-08-12 12:06:08 +00:00
|
|
|
substituteInPlace dvc/daemon.py \
|
|
|
|
--subst-var-by dvc "$out/bin/dcv"
|
|
|
|
'';
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
nativeBuildInputs = with python3.pkgs; [
|
2023-05-24 13:37:59 +00:00
|
|
|
pythonRelaxDepsHook
|
2022-01-19 23:45:15 +00:00
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
2022-06-16 17:23:12 +00:00
|
|
|
appdirs
|
2020-04-24 23:36:52 +00:00
|
|
|
colorama
|
|
|
|
configobj
|
2022-01-19 23:45:15 +00:00
|
|
|
distro
|
|
|
|
dpath
|
2022-07-14 12:49:19 +00:00
|
|
|
dvc-data
|
2023-05-24 13:37:59 +00:00
|
|
|
dvc-http
|
2022-06-16 17:23:12 +00:00
|
|
|
dvc-render
|
2023-05-24 13:37:59 +00:00
|
|
|
dvc-studio-client
|
2022-08-12 12:06:08 +00:00
|
|
|
dvc-task
|
2022-01-19 23:45:15 +00:00
|
|
|
flatten-dict
|
|
|
|
flufl_lock
|
|
|
|
funcy
|
|
|
|
grandalf
|
2023-05-24 13:37:59 +00:00
|
|
|
hydra-core
|
|
|
|
iterative-telemetry
|
2022-01-19 23:45:15 +00:00
|
|
|
networkx
|
2022-06-16 17:23:12 +00:00
|
|
|
packaging
|
2022-01-19 23:45:15 +00:00
|
|
|
pathspec
|
2023-05-24 13:37:59 +00:00
|
|
|
platformdirs
|
2022-01-19 23:45:15 +00:00
|
|
|
psutil
|
|
|
|
pydot
|
|
|
|
pygtrie
|
|
|
|
pyparsing
|
2020-04-24 23:36:52 +00:00
|
|
|
requests
|
2022-01-19 23:45:15 +00:00
|
|
|
rich
|
|
|
|
ruamel-yaml
|
|
|
|
scmrepo
|
|
|
|
shortuuid
|
|
|
|
shtab
|
|
|
|
tabulate
|
2022-08-12 12:06:08 +00:00
|
|
|
tomlkit
|
2022-01-19 23:45:15 +00:00
|
|
|
tqdm
|
|
|
|
typing-extensions
|
|
|
|
voluptuous
|
|
|
|
zc_lockfile
|
2022-10-30 15:09:59 +00:00
|
|
|
] ++ lib.optionals enableGoogle [
|
2023-05-24 13:37:59 +00:00
|
|
|
dvc-gs
|
2022-10-30 15:09:59 +00:00
|
|
|
] ++ lib.optionals enableAWS [
|
2023-05-24 13:37:59 +00:00
|
|
|
dvc-s3
|
2022-10-30 15:09:59 +00:00
|
|
|
] ++ lib.optionals enableAzure [
|
2023-05-24 13:37:59 +00:00
|
|
|
dvc-azure
|
2022-10-30 15:09:59 +00:00
|
|
|
] ++ lib.optionals enableSSH [
|
2023-05-24 13:37:59 +00:00
|
|
|
dvc-ssh
|
2022-01-19 23:45:15 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
importlib-metadata
|
|
|
|
] ++ lib.optionals (pythonOlder "3.9") [
|
|
|
|
importlib-resources
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
# Tests require access to real cloud services
|
|
|
|
doCheck = false;
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
pythonImportsCheck = [ "dvc" "dvc.api" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Version Control System for Machine Learning Projects";
|
|
|
|
homepage = "https://dvc.org";
|
2023-05-24 13:37:59 +00:00
|
|
|
changelog = "https://github.com/iterative/dvc/releases/tag/${version}";
|
2022-01-19 23:45:15 +00:00
|
|
|
license = licenses.asl20;
|
2023-01-11 07:51:40 +00:00
|
|
|
maintainers = with maintainers; [ cmcdragonkai fab ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|