3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/version-management/dvc/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

128 lines
2.6 KiB
Nix
Raw Normal View History

2019-01-24 04:44:34 +00:00
{ lib
2022-01-15 16:34:43 +00:00
, python3
2019-01-24 04:44:34 +00:00
, fetchFromGitHub
2022-03-30 01:54:53 +01:00
, fetchpatch
2019-01-24 04:44:34 +00:00
, enableGoogle ? false
, enableAWS ? false
, enableAzure ? false
, enableSSH ? false
}:
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 {
2019-01-24 04:44:34 +00:00
pname = "dvc";
2022-05-27 20:29:48 +01:00
version = "2.10.2";
2022-01-15 16:34:43 +00:00
format = "setuptools";
2019-01-24 04:44:34 +00:00
src = fetchFromGitHub {
owner = "iterative";
2022-01-15 16:34:43 +00:00
repo = pname;
2019-01-24 04:44:34 +00:00
rev = version;
2022-05-27 20:29:48 +01:00
hash = "sha256-boaQSg0jajWQZKB5wvcP2musVR2/pifT4pU64Y5hiQ0=";
2019-01-24 04:44:34 +00:00
};
nativeBuildInputs = with py.pkgs; [
2022-01-15 16:34:43 +00:00
setuptools-scm
setuptools-scm-git-archive
];
propagatedBuildInputs = with py.pkgs; [
2022-01-15 16:34:43 +00:00
aiohttp-retry
2022-05-27 20:29:48 +01:00
appdirs
2019-01-24 04:44:34 +00:00
colorama
configobj
2022-01-15 16:34:43 +00:00
configobj
dictdiffer
diskcache
distro
dpath
2022-05-27 20:29:48 +01:00
dvclive
dvc-render
2022-01-15 16:34:43 +00:00
flatten-dict
flufl_lock
funcy
grandalf
2019-01-24 04:44:34 +00:00
nanotime
2022-01-15 16:34:43 +00:00
networkx
2022-05-27 20:29:48 +01:00
packaging
2022-01-15 16:34:43 +00:00
pathspec
ply
psutil
pydot
pygtrie
pyparsing
python-benedict
2019-01-24 04:44:34 +00:00
requests
2022-01-15 16:34:43 +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
];
2019-01-24 04:44:34 +00:00
2022-05-27 20:29:48 +01:00
postPatch = ''
substituteInPlace dvc/daemon.py \
--subst-var-by dvc "$out/bin/dcv"
'';
2022-01-15 16:34:43 +00:00
# Tests require access to real cloud services
doCheck = false;
2019-01-24 04:44:34 +00:00
meta = with lib; {
description = "Version Control System for Machine Learning Projects";
homepage = "https://dvc.org";
2022-01-15 16:34:43 +00:00
license = licenses.asl20;
maintainers = with maintainers; [ cmcdragonkai fab ];
2019-01-24 04:44:34 +00:00
};
}