Something went wrong. Try again.
lol
Something went wrong. Try again.
3.6 kB · 191 lines
Nix
at master
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192{ buildPythonPackage, lib, setuptools, stdenv, fetchFromGitHub, pythonAtLeast, installShellFiles, git, versioneer, # core platformdirs, chardet, iso8601, humanize, fasteners, packaging, patool, tqdm, annexremote, looseversion, git-annex, # downloaders boto3, keyrings-alt, keyring, msgpack, requests, # publish python-gitlab, # misc argcomplete, pyperclip, python-dateutil, # duecredit duecredit, distro, # win colorama, # tests pytest-retry, pytest-xdist, pytestCheckHook, p7zip, curl, httpretty,}:
buildPythonPackage (finalAttrs: { pname = "datalad"; version = "1.3.4"; pyproject = true;
src = fetchFromGitHub { owner = "datalad"; repo = "datalad"; tag = finalAttrs.version; hash = "sha256-5PAHHN+dgMAxqUZn3vXWsoesw3lQMy6Q8nUJYa4SofM="; };
postPatch = '' # Remove vendorized versioneer.py rm versioneer.py '';
nativeBuildInputs = [ installShellFiles git ];
build-system = [ setuptools versioneer ];
dependencies = finalAttrs.passthru.optional-dependencies.core ++ finalAttrs.passthru.optional-dependencies.downloaders ++ finalAttrs.passthru.optional-dependencies.publish;
optional-dependencies = { core = [ platformdirs chardet distro iso8601 humanize fasteners packaging patool tqdm annexremote looseversion ] ++ lib.optionals stdenv.hostPlatform.isWindows [ colorama ]; downloaders = [ boto3 keyrings-alt keyring msgpack requests ]; downloaders-extra = [ # requests-ftp # not in nixpkgs yet ]; publish = [ python-gitlab ]; misc = [ argcomplete pyperclip python-dateutil ]; duecredit = [ duecredit ]; };
postInstall = '' installShellCompletion --cmd datalad \ --bash <($out/bin/datalad shell-completion) \ --zsh <($out/bin/datalad shell-completion) wrapProgram $out/bin/datalad \ --prefix PATH : "${git-annex}/bin" \ --prefix PYTHONPATH : "$PYTHONPATH" '';
preCheck = '' export HOME=$TMPDIR export DATALAD_TESTS_NONETWORK=1 export PATH="$PATH:$out/bin" '';
disabledTestMarks = [ "flaky" ];
disabledTests = [ # Tries to run `git` and fails "test_reckless" "test_create" "test_subsuperdataset_save"
# Tries to spawn a subshell and fails "test_shell_completion_source"
# Times out "test_rerun_unrelated_nonrun_left_run_right"
# Top five slowest (2/3 of total runtime) "test_files_split" "test_gitannex_local" "test_save_hierarchy" "test_recurse_existing" "test_source_candidate_subdataset" ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # pbcopy not found "test_wtf" # hangs "test_keyring" ];
nativeCheckInputs = [ p7zip pytest-retry pytest-xdist pytestCheckHook git-annex curl httpretty ];
pytestFlags = [ # Deprecated in 3.13. Use exc_type_str instead. "-Wignore::DeprecationWarning" ];
# Tests use ports on localhost __darwinAllowLocalNetworking = true;
pythonImportsCheck = [ "datalad" ];
meta = { description = "Keep code, data, containers under control with git and git-annex"; homepage = "https://www.datalad.org"; changelog = "https://github.com/datalad/datalad/blob/${finalAttrs.src.tag}/CHANGELOG.md"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ renesat malik sarahec ]; };})