tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
dvc: init at 0.24.3
authored by
Roger Qiu
and committed by
Roger Qiu
6 years ago
3c3ac19c
bae9fd59
+95
3 changed files
expand all
collapse all
unified
split
pkgs
applications
version-management
dvc
default.nix
dvc-daemon.patch
top-level
all-packages.nix
+65
pkgs/applications/version-management/dvc/default.nix
···
1
1
+
{ lib
2
2
+
, python3Packages
3
3
+
, fetchFromGitHub
4
4
+
, enableGoogle ? false
5
5
+
, enableAWS ? false
6
6
+
, enableAzure ? false
7
7
+
, enableSSH ? false
8
8
+
}:
9
9
+
10
10
+
with python3Packages;
11
11
+
buildPythonApplication rec {
12
12
+
pname = "dvc";
13
13
+
version = "0.24.3";
14
14
+
15
15
+
# PyPi only has wheel
16
16
+
src = fetchFromGitHub {
17
17
+
owner = "iterative";
18
18
+
repo = "dvc";
19
19
+
rev = version;
20
20
+
sha256 = "1wqq4i23hppilp20fx5a5nj93xwf3wwwr2f8aasvn6jkv2l22vpl";
21
21
+
};
22
22
+
23
23
+
propagatedBuildInputs = [
24
24
+
ply
25
25
+
configparser
26
26
+
zc_lockfile
27
27
+
future
28
28
+
colorama
29
29
+
configobj
30
30
+
networkx
31
31
+
pyyaml
32
32
+
GitPython
33
33
+
setuptools
34
34
+
nanotime
35
35
+
pyasn1
36
36
+
schema
37
37
+
jsonpath_rw
38
38
+
requests
39
39
+
grandalf
40
40
+
asciimatics
41
41
+
distro
42
42
+
appdirs
43
43
+
]
44
44
+
++ lib.optional enableGoogle google_cloud_storage
45
45
+
++ lib.optional enableAWS boto3
46
46
+
++ lib.optional enableAzure azure-storage-blob
47
47
+
++ lib.optional enableSSH paramiko;
48
48
+
49
49
+
# tests require access to real cloud services
50
50
+
# nix build tests have to be isolated and run locally
51
51
+
doCheck = false;
52
52
+
53
53
+
patches = [ ./dvc-daemon.patch ];
54
54
+
55
55
+
postPatch = ''
56
56
+
substituteInPlace dvc/daemon.py --subst-var-by dvc "$out/bin/dcv"
57
57
+
'';
58
58
+
59
59
+
meta = with lib; {
60
60
+
description = "Version Control System for Machine Learning Projects";
61
61
+
license = licenses.asl20;
62
62
+
homepage = https://dvc.org;
63
63
+
maintainers = with maintainers; [ cmcdragonkai ];
64
64
+
};
65
65
+
}
+21
pkgs/applications/version-management/dvc/dvc-daemon.patch
···
1
1
+
diff --git a/dvc/daemon.py b/dvc/daemon.py
2
2
+
index 1d67a37..7ce6fde 100644
3
3
+
--- a/dvc/daemon.py
4
4
+
+++ b/dvc/daemon.py
5
5
+
@@ -67,14 +67,8 @@ def daemon(args):
6
6
+
Args:
7
7
+
args (list): list of arguments to append to `dvc daemon` command.
8
8
+
"""
9
9
+
- cmd = [sys.executable]
10
10
+
- if not is_binary():
11
11
+
- cmd += ['-m', 'dvc']
12
12
+
- cmd += ['daemon', '-q'] + args
13
13
+
-
14
14
+
- env = fix_env()
15
15
+
- file_path = os.path.abspath(inspect.stack()[0][1])
16
16
+
- env['PYTHONPATH'] = os.path.dirname(os.path.dirname(file_path))
17
17
+
+ cmd = [ "@dvc@" , "daemon", "-q"] + args
18
18
+
+ env = None
19
19
+
20
20
+
logger.debug("Trying to spawn '{}' with env '{}'".format(cmd, env))
21
21
+
+9
pkgs/top-level/all-packages.nix
···
1345
1345
1346
1346
duperemove = callPackage ../tools/filesystems/duperemove { };
1347
1347
1348
1348
+
dvc = callPackage ../applications/version-management/dvc { };
1349
1349
+
1350
1350
+
dvc-with-remotes = callPackage ../applications/version-management/dvc {
1351
1351
+
enableGoogle = true;
1352
1352
+
enableAWS = true;
1353
1353
+
enableAzure = true;
1354
1354
+
enableSSH = true;
1355
1355
+
};
1356
1356
+
1348
1357
dylibbundler = callPackage ../tools/misc/dylibbundler { };
1349
1358
1350
1359
dynamic-colors = callPackage ../tools/misc/dynamic-colors { };