Skip to content

Commit 03a0bee

Browse files
authored
python312Packages.hf-xet: init at 1.0.3 (NixOS#397891)
2 parents 2fafad5 + c71ad75 commit 03a0bee

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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+
}

pkgs/top-level/python-packages.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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 { };

0 commit comments

Comments
 (0)