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-06-16 17:23:12 +00:00
|
|
|
let
|
|
|
|
py = python3.override {
|
|
|
|
packageOverrides = self: super: {
|
|
|
|
|
|
|
|
grandalf = super.grandalf.overridePythonAttrs (oldAttrs: rec {
|
|
|
|
version = "0.6";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bdcht";
|
|
|
|
repo = "grandalf";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-T4pVzjz1WbfBA2ybN4IRK73PD/eb83YUW0BZrBESNLg=";
|
|
|
|
};
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "setup_requires=['pytest-runner',]," ""
|
|
|
|
'';
|
|
|
|
});
|
|
|
|
|
|
|
|
scmrepo = super.scmrepo.overridePythonAttrs (oldAttrs: rec {
|
|
|
|
version = "0.0.19";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "iterative";
|
|
|
|
repo = "scmrepo";
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-f/KV3NfIumkZcg9r421QhdyPU/274aAU4b78myi+fFY=";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
|
|
|
with py.pkgs;
|
|
|
|
|
|
|
|
buildPythonApplication rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "dvc";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "2.10.2";
|
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-06-16 17:23:12 +00:00
|
|
|
hash = "sha256-boaQSg0jajWQZKB5wvcP2musVR2/pifT4pU64Y5hiQ0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
nativeBuildInputs = with py.pkgs; [
|
2022-01-19 23:45:15 +00:00
|
|
|
setuptools-scm
|
|
|
|
setuptools-scm-git-archive
|
|
|
|
];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
propagatedBuildInputs = with py.pkgs; [
|
2022-01-19 23:45:15 +00:00
|
|
|
aiohttp-retry
|
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
|
|
|
configobj
|
|
|
|
dictdiffer
|
|
|
|
diskcache
|
|
|
|
distro
|
|
|
|
dpath
|
2022-06-16 17:23:12 +00:00
|
|
|
dvclive
|
|
|
|
dvc-render
|
2022-01-19 23:45:15 +00:00
|
|
|
flatten-dict
|
|
|
|
flufl_lock
|
|
|
|
funcy
|
|
|
|
grandalf
|
2020-04-24 23:36:52 +00:00
|
|
|
nanotime
|
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
|
|
|
|
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-06-16 17:23:12 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace dvc/daemon.py \
|
|
|
|
--subst-var-by dvc "$out/bin/dcv"
|
|
|
|
'';
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|