summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/datalad-next/default.nix
blob: 8a063e55244ad77630e13651f0138fc04f157789 (plain)
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
{
  lib,
  annexremote,
  buildPythonPackage,
  datalad,
  datasalad,
  distutils,
  fetchFromGitHub,
  git-annex,
  git,
  hatch-vcs,
  hatchling,
  humanize,
  more-itertools,
  openssh,
  psutil,
  pytestCheckHook,
  pythonAtLeast,
  requests-toolbelt,
  requests,
  unzip,
  webdavclient3,
  writableTmpDirAsHomeHook,
}:

buildPythonPackage {
  pname = "datalad-next";
  version = "1.6.0-unstable-2025-07-04";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "datalad";
    repo = "datalad-next";
    rev = "2d2b1526c1e396964dd3ffdbb37597adefe7682d";
    hash = "sha256-47cRxaxOGzR6hDfiW2hS3MNHp2aP9rxtWNxV+33PPfs=";
  };

  env.SETUPTOOLS_SCM_PRETEND_VERSION = "1.6.0";

  nativeBuildInputs = [ git ];

  build-system = [
    hatchling
    hatch-vcs
  ];

  dependencies = [
    annexremote
    datasalad
    datalad
    humanize
    more-itertools
  ];

  optional-dependencies = {
    httpsupport = [
      requests
      requests-toolbelt
    ];
  };

  nativeCheckInputs = [
    datalad
    git-annex
    openssh
    psutil
    pytestCheckHook
    unzip
    webdavclient3
    writableTmpDirAsHomeHook
  ];

  disabledTests = [
    # remotes available after datalad-next install (through `console_scripts`), but not yet in $PATH during test
    "test_uncurl_addurl_unredirected"
    "test_uncurl"
    "test_uncurl_ria_access"
    "test_uncurl_store"
    "test_uncurl_remove"
    "test_uncurl_testremote"
    "test_replace_add_archive_content"
    "test_annex_remote"
    "test_export_remote"
    "test_annex_remote_autorepush"
    "test_export_remote_autorepush"
    "test_typeweb_annex"
    "test_typeweb_annex_uncompressed"
    "test_typeweb_export"
    "test_submodule_url"
    "test_uncurl_progress_reporting_to_annex"
    "test_archivist_retrieval"
    "test_archivist_retrieval_legacy"

    # hardcoded /bin path
    "test_auto_if_wanted_data_transfer_path_restriction"

    # Test require internet access
    "test_auto_data_transfer"
    "test_compressed_file_stay_compressed"
    "test_delete_method"
    "test_delete_timeout"
    "test_http_url_operations"
    "test_iter_tar"
    "test_ls_file_collection_tarfile"
    "test_push_wanted"
    "test_transparent_decompression"
  ]
  ++ lib.optionals (pythonAtLeast "3.13") [
    # RuntimeError
    "test_tree_with_broken_symlinks"
  ];

  disabledTestPaths = [
    # Tests require internet access
    "datalad_next/commands/tests/test_download.py"
    "datalad_next/archive_operations/tests/test_tarfile.py"
  ];

  pythonImportsCheck = [ "datalad_next" ];

  meta = {
    description = "DataLad extension with a staging area for additional functionality, or for improved performance and user experience";
    changelog = "https://github.com/datalad/datalad-next/blob/main/CHANGELOG.md";
    homepage = "https://github.com/datalad/datalad-next";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ gador ];
  };
}