Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitHub, installShellFiles, python3, git, git-annex }: 2 3python3.pkgs.buildPythonApplication rec { 4 pname = "datalad"; 5 version = "0.18.3"; 6 7 src = fetchFromGitHub { 8 owner = "datalad"; 9 repo = pname; 10 rev = version; 11 hash = "sha256-vqO37o5NxQk+gHfvhM1I2ea9/q9ZaLWkDEyPYJKEPcs"; 12 }; 13 14 nativeBuildInputs = [ installShellFiles git ]; 15 16 propagatedBuildInputs = with python3.pkgs; [ 17 # core 18 platformdirs 19 chardet 20 iso8601 21 humanize 22 fasteners 23 packaging 24 patool 25 tqdm 26 annexremote 27 looseversion 28 setuptools 29 git-annex 30 31 # downloaders-extra 32 # requests-ftp # not in nixpkgs yet 33 34 # downloaders 35 boto 36 keyrings-alt 37 keyring 38 msgpack 39 requests 40 41 # publish 42 python-gitlab 43 44 # misc 45 argcomplete 46 pyperclip 47 python-dateutil 48 49 # metadata 50 simplejson 51 whoosh 52 53 # metadata-extra 54 pyyaml 55 mutagen 56 exifread 57 python-xmp-toolkit 58 pillow 59 60 # duecredit 61 duecredit 62 63 # python>=3.8 64 distro 65 ] ++ lib.optionals stdenv.hostPlatform.isWindows [ colorama ] 66 ++ lib.optionals (python3.pythonOlder "3.10") [ importlib-metadata ]; 67 68 postInstall = '' 69 installShellCompletion --cmd datalad \ 70 --bash <($out/bin/datalad shell-completion) \ 71 --zsh <($out/bin/datalad shell-completion) 72 wrapProgram $out/bin/datalad --prefix PYTHONPATH : "$PYTHONPATH" 73 ''; 74 75 # no tests 76 doCheck = false; 77 78 pythonImportsCheck = [ "datalad" ]; 79 80 meta = with lib; { 81 description = "Keep code, data, containers under control with git and git-annex"; 82 homepage = "https://www.datalad.org"; 83 license = licenses.mit; 84 maintainers = with maintainers; [ renesat ]; 85 }; 86}