nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at r-updates 58 lines 1.2 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pkg-config, 6 rustPlatform, 7 openssl, 8}: 9 10buildPythonPackage (finalAttrs: { 11 pname = "hf-xet"; 12 version = "1.4.2"; 13 pyproject = true; 14 15 src = fetchFromGitHub { 16 owner = "huggingface"; 17 repo = "xet-core"; 18 tag = "v${finalAttrs.version}"; 19 hash = "sha256-UdHEpJztlVI8LPs8Ne9sKe1Nv3kVVk4YLxQ3W8sUPbQ="; 20 }; 21 22 sourceRoot = "${finalAttrs.src.name}/hf_xet"; 23 24 cargoDeps = rustPlatform.fetchCargoVendor { 25 inherit (finalAttrs) 26 pname 27 version 28 src 29 sourceRoot 30 ; 31 hash = "sha256-GV+XY5uV57yQWVGdRLpGU3eD8Gz2gy6p7OHlF+mlJI4="; 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/tree/main/hf_xet"; 54 changelog = "https://github.com/huggingface/xet-core/releases/tag/${finalAttrs.src.tag}"; 55 license = lib.licenses.asl20; 56 maintainers = with lib.maintainers; [ GaetanLepage ]; 57 }; 58})