Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.05 39 lines 953 B view raw
1{ lib 2, fetchFromGitHub 3, buildPythonPackage 4, pythonOlder 5, filelock 6, importlib-metadata 7, requests 8, tqdm 9}: 10 11buildPythonPackage rec { 12 pname = "huggingface-hub"; 13 version = "0.0.6"; 14 15 src = fetchFromGitHub { 16 owner = "huggingface"; 17 repo = "huggingface_hub"; 18 rev = "v${version}"; 19 hash = "sha256-0DSgWmodeRmvGq2v3n86BzRx5Xdb8fIQh+G/2O2d+yo="; 20 }; 21 22 propagatedBuildInputs = [ 23 filelock 24 requests 25 tqdm 26 ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ]; 27 28 # Tests require network access. 29 doCheck = false; 30 pythonImportsCheck = [ "huggingface_hub" ]; 31 32 meta = with lib; { 33 homepage = "https://github.com/huggingface/huggingface_hub"; 34 description = "Download and publish models and other files on the huggingface.co hub"; 35 changelog = "https://github.com/huggingface/huggingface_hub/releases/tag/${version}"; 36 license = licenses.asl20; 37 maintainers = with maintainers; [ danieldk ]; 38 }; 39}