File tree Expand file tree Collapse file tree 2 files changed +60
-0
lines changed
development/python-modules/hf-xet Expand file tree Collapse file tree 2 files changed +60
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ lib ,
3+ buildPythonPackage ,
4+ fetchFromGitHub ,
5+ pkg-config ,
6+ rustPlatform ,
7+ openssl ,
8+ } :
9+
10+ buildPythonPackage rec {
11+ pname = "hf-xet" ;
12+ version = "1.0.3" ;
13+ pyproject = true ;
14+
15+ src = fetchFromGitHub {
16+ owner = "huggingface" ;
17+ repo = "xet-core" ;
18+ tag = "v${ version } " ;
19+ hash = "sha256-ZbLSPLRsRVSF9HD+R8k/GR7yq3Ej+c+AyYbyHhKOf3w=" ;
20+ } ;
21+
22+ sourceRoot = "${ src . name } /hf_xet" ;
23+
24+ cargoDeps = rustPlatform . fetchCargoVendor {
25+ inherit
26+ pname
27+ version
28+ src
29+ sourceRoot
30+ ;
31+ hash = "sha256-gO5A457CJUdV7nfy69yliL6uqMu5Fc3rY2uXyMM/Na0=" ;
32+ } ;
33+
34+ nativeBuildInputs = [
35+ pkg-config
36+ rustPlatform . cargoSetupHook
37+ rustPlatform . maturinBuildHook
38+ ] ;
39+
40+ buildInputs = [
41+ openssl
42+ ] ;
43+
44+ env . OPENSSL_NO_VENDOR = 1 ;
45+
46+ pythonImportsCheck = [ "hf_xet" ] ;
47+
48+ # No tests (yet?)
49+ doCheck = false ;
50+
51+ meta = {
52+ description = "Xet client tech, used in huggingface_hub" ;
53+ homepage = "https://github.com/huggingface/xet-core/hf_xet" ;
54+ changelog = "https://github.com/huggingface/xet-core/releases/tag/v${ version } " ;
55+ license = lib . licenses . asl20 ;
56+ maintainers = with lib . maintainers ; [ GaetanLepage ] ;
57+ } ;
58+ }
Original file line number Diff line number Diff line change @@ -6204,6 +6204,8 @@ self: super: with self; {
62046204
62056205 hf-transfer = callPackage ../development/python-modules/hf-transfer { };
62066206
6207+ hf-xet = callPackage ../development/python-modules/hf-xet { };
6208+
62076209 hfst = callPackage ../development/python-modules/hfst { };
62086210
62096211 hg-commitsigs = callPackage ../development/python-modules/hg-commitsigs { };
You can’t perform that action at this time.
0 commit comments