62 lines
1.4 KiB
Nix
62 lines
1.4 KiB
Nix
/*
|
|
* WARNING: Just use `pkgs.python312Packages.huggingface-hub` (or change python version)
|
|
* WARNING: I didn't realise it existed when I packaged this.
|
|
*
|
|
* Nix Resources:
|
|
* 1. https://wiki.nixos.org/wiki/Python
|
|
* 2. https://nixos.org/manual/nixpkgs/unstable/#developing-with-python
|
|
*
|
|
* Hugging Face Resources:
|
|
* 1. https://github.com/huggingface/huggingface_hub
|
|
* 2. https://huggingface.co/docs/huggingface_hub/main/en/guides/cli
|
|
*/
|
|
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchPypi,
|
|
# build time dependencies
|
|
setuptools,
|
|
# runtime dependencies
|
|
filelock,
|
|
fsspec,
|
|
hf-xet,
|
|
pyyaml,
|
|
requests,
|
|
tqdm,
|
|
typing-extensions,
|
|
}:
|
|
buildPythonPackage rec {
|
|
pname = "huggingface_hub";
|
|
version = "0.34.3";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-1YEw/VqnQISAaBR1SRwKvX6DVEIIL7w+9NRbbDn4OFM=";
|
|
};
|
|
|
|
pyproject = true;
|
|
doCheck = false; # skip unit testing
|
|
pythonImportsCheck = ["huggingface_hub"];
|
|
|
|
# buildtime dependencies
|
|
build-system = [
|
|
setuptools
|
|
];
|
|
# runtime dependencies
|
|
dependencies = [
|
|
filelock
|
|
fsspec
|
|
hf-xet
|
|
pyyaml
|
|
requests
|
|
tqdm
|
|
typing-extensions
|
|
];
|
|
|
|
meta = rec {
|
|
description = "The official Python client for the Huggingface Hub.";
|
|
homepage = "https://github.com/huggingface/huggingface_hub";
|
|
changelog = "${homepage}/releases/tag/v${version}";
|
|
license = lib.licenses.asl20; # Apache License 2.0
|
|
};
|
|
}
|