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-01-19 23:45:15 +00:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "dvc";
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "2.9.5";
|
2022-01-19 23:45:15 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "iterative";
|
2022-01-19 23:45:15 +00:00
|
|
|
repo = pname;
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = version;
|
2022-03-30 09:31:56 +00:00
|
|
|
hash = "sha256-MviiA0ja1IaxMPlqu2dhIGBcdEXiEvBYnK9731dihMg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
# make the patch apply
|
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "scmrepo==0.0.7" "scmrepo==0.0.10"
|
|
|
|
'';
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./dvc-daemon.patch
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/iterative/dvc/commit/ab54b5bdfcef3576b455a17670b8df27beb504ce.patch";
|
|
|
|
sha256 = "sha256-wzMK6Br7/+d3EEGpfPuQ6Trj8IPfehdUvOvX3HZlS+o=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "grandalf==0.6" "grandalf>=0.6" \
|
|
|
|
--replace "scmrepo==0.0.13" "scmrepo"
|
|
|
|
substituteInPlace dvc/daemon.py \
|
|
|
|
--subst-var-by dvc "$out/bin/dcv"
|
|
|
|
'';
|
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
nativeBuildInputs = with python3.pkgs; [
|
|
|
|
setuptools-scm
|
|
|
|
setuptools-scm-git-archive
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
appdirs
|
|
|
|
aiohttp-retry
|
2020-04-24 23:36:52 +00:00
|
|
|
colorama
|
|
|
|
configobj
|
2022-01-19 23:45:15 +00:00
|
|
|
configobj
|
|
|
|
dictdiffer
|
|
|
|
diskcache
|
|
|
|
distro
|
|
|
|
dpath
|
|
|
|
flatten-dict
|
|
|
|
flufl_lock
|
|
|
|
funcy
|
|
|
|
grandalf
|
2020-04-24 23:36:52 +00:00
|
|
|
nanotime
|
2022-01-19 23:45:15 +00:00
|
|
|
networkx
|
|
|
|
pathspec
|
|
|
|
ply
|
|
|
|
psutil
|
|
|
|
pydot
|
|
|
|
pygtrie
|
|
|
|
pyparsing
|
|
|
|
python-benedict
|
2020-04-24 23:36:52 +00:00
|
|
|
requests
|
2022-01-19 23:45:15 +00:00
|
|
|
rich
|
|
|
|
ruamel-yaml
|
|
|
|
scmrepo
|
|
|
|
shortuuid
|
|
|
|
shtab
|
|
|
|
tabulate
|
|
|
|
toml
|
|
|
|
tqdm
|
|
|
|
typing-extensions
|
|
|
|
voluptuous
|
|
|
|
zc_lockfile
|
|
|
|
] ++ lib.optional enableGoogle [
|
|
|
|
google-cloud-storage
|
|
|
|
] ++ lib.optional enableAWS [
|
|
|
|
boto3
|
|
|
|
] ++ lib.optional enableAzure [
|
|
|
|
azure-storage-blob
|
|
|
|
] ++ lib.optional enableSSH [
|
|
|
|
paramiko
|
|
|
|
] ++ 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;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Version Control System for Machine Learning Projects";
|
|
|
|
homepage = "https://dvc.org";
|
2022-01-19 23:45:15 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ cmcdragonkai fab ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|