forked from mirrors/nixpkgs
dvc: init at 0.24.3
This commit is contained in:
parent
bae9fd59a9
commit
3c3ac19c43
65
pkgs/applications/version-management/dvc/default.nix
Normal file
65
pkgs/applications/version-management/dvc/default.nix
Normal file
|
@ -0,0 +1,65 @@
|
|||
{ lib
|
||||
, python3Packages
|
||||
, fetchFromGitHub
|
||||
, enableGoogle ? false
|
||||
, enableAWS ? false
|
||||
, enableAzure ? false
|
||||
, enableSSH ? false
|
||||
}:
|
||||
|
||||
with python3Packages;
|
||||
buildPythonApplication rec {
|
||||
pname = "dvc";
|
||||
version = "0.24.3";
|
||||
|
||||
# PyPi only has wheel
|
||||
src = fetchFromGitHub {
|
||||
owner = "iterative";
|
||||
repo = "dvc";
|
||||
rev = version;
|
||||
sha256 = "1wqq4i23hppilp20fx5a5nj93xwf3wwwr2f8aasvn6jkv2l22vpl";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
ply
|
||||
configparser
|
||||
zc_lockfile
|
||||
future
|
||||
colorama
|
||||
configobj
|
||||
networkx
|
||||
pyyaml
|
||||
GitPython
|
||||
setuptools
|
||||
nanotime
|
||||
pyasn1
|
||||
schema
|
||||
jsonpath_rw
|
||||
requests
|
||||
grandalf
|
||||
asciimatics
|
||||
distro
|
||||
appdirs
|
||||
]
|
||||
++ lib.optional enableGoogle google_cloud_storage
|
||||
++ lib.optional enableAWS boto3
|
||||
++ lib.optional enableAzure azure-storage-blob
|
||||
++ lib.optional enableSSH paramiko;
|
||||
|
||||
# tests require access to real cloud services
|
||||
# nix build tests have to be isolated and run locally
|
||||
doCheck = false;
|
||||
|
||||
patches = [ ./dvc-daemon.patch ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace dvc/daemon.py --subst-var-by dvc "$out/bin/dcv"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Version Control System for Machine Learning Projects";
|
||||
license = licenses.asl20;
|
||||
homepage = https://dvc.org;
|
||||
maintainers = with maintainers; [ cmcdragonkai ];
|
||||
};
|
||||
}
|
21
pkgs/applications/version-management/dvc/dvc-daemon.patch
Normal file
21
pkgs/applications/version-management/dvc/dvc-daemon.patch
Normal file
|
@ -0,0 +1,21 @@
|
|||
diff --git a/dvc/daemon.py b/dvc/daemon.py
|
||||
index 1d67a37..7ce6fde 100644
|
||||
--- a/dvc/daemon.py
|
||||
+++ b/dvc/daemon.py
|
||||
@@ -67,14 +67,8 @@ def daemon(args):
|
||||
Args:
|
||||
args (list): list of arguments to append to `dvc daemon` command.
|
||||
"""
|
||||
- cmd = [sys.executable]
|
||||
- if not is_binary():
|
||||
- cmd += ['-m', 'dvc']
|
||||
- cmd += ['daemon', '-q'] + args
|
||||
-
|
||||
- env = fix_env()
|
||||
- file_path = os.path.abspath(inspect.stack()[0][1])
|
||||
- env['PYTHONPATH'] = os.path.dirname(os.path.dirname(file_path))
|
||||
+ cmd = [ "@dvc@" , "daemon", "-q"] + args
|
||||
+ env = None
|
||||
|
||||
logger.debug("Trying to spawn '{}' with env '{}'".format(cmd, env))
|
||||
|
|
@ -1345,6 +1345,15 @@ in
|
|||
|
||||
duperemove = callPackage ../tools/filesystems/duperemove { };
|
||||
|
||||
dvc = callPackage ../applications/version-management/dvc { };
|
||||
|
||||
dvc-with-remotes = callPackage ../applications/version-management/dvc {
|
||||
enableGoogle = true;
|
||||
enableAWS = true;
|
||||
enableAzure = true;
|
||||
enableSSH = true;
|
||||
};
|
||||
|
||||
dylibbundler = callPackage ../tools/misc/dylibbundler { };
|
||||
|
||||
dynamic-colors = callPackage ../tools/misc/dynamic-colors { };
|
||||
|
|
Loading…
Reference in a new issue