Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 pythonOlder, 5 fetchFromGitHub, 6 setuptools, 7 filelock, 8 fsspec, 9 packaging, 10 pyyaml, 11 requests, 12 tqdm, 13 typing-extensions, 14}: 15 16buildPythonPackage rec { 17 pname = "huggingface-hub"; 18 version = "0.24.2"; 19 pyproject = true; 20 21 disabled = pythonOlder "3.8"; 22 23 src = fetchFromGitHub { 24 owner = "huggingface"; 25 repo = "huggingface_hub"; 26 rev = "refs/tags/v${version}"; 27 hash = "sha256-tbv5ri37udhx9qhPhCRFe0GOc62n0e7uF0EjDpF2TIQ="; 28 }; 29 30 build-system = [ setuptools ]; 31 32 dependencies = [ 33 filelock 34 fsspec 35 packaging 36 pyyaml 37 requests 38 tqdm 39 typing-extensions 40 ]; 41 42 # Tests require network access. 43 doCheck = false; 44 45 pythonImportsCheck = [ "huggingface_hub" ]; 46 47 meta = { 48 description = "Download and publish models and other files on the huggingface.co hub"; 49 mainProgram = "huggingface-cli"; 50 homepage = "https://github.com/huggingface/huggingface_hub"; 51 changelog = "https://github.com/huggingface/huggingface_hub/releases/tag/v${version}"; 52 license = lib.licenses.asl20; 53 maintainers = with lib.maintainers; [ GaetanLepage ]; 54 }; 55}