summary refs log tree commit diff
path: root/pkgs/applications/version-management/dvc/default.nix
blob: fe10551771cfedc7367a4c83da772f45af41c4ba (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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 ];
  };
}