dotfiles/hosts/packages/huggingface_hub/flake.nix

35 lines
850 B
Nix

# Template: https://nixos-and-flakes.thiscute.world/development/intro
{
description = "Humanity's Last Exam - Devshell";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
};
outputs = {nixpkgs, ...}: let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
};
python = pkgs.python312.override {
self = python;
packageOverrides = pyfinal: pyprev: {
huggingface-hub = pyfinal.callPackage ./huggingface_hub.nix {};
hf-xet = pyfinal.callPackage ./hf-xet.nix {};
};
};
in {
devShells."${system}".default = pkgs.mkShell {
packages = [
(python.withPackages (pypkgs: [
pypkgs.huggingface-hub
]))
];
shell = "${pkgs.bash}/bin/bash";
shellHook = ''
alias hf=huggingface-cli
'';
};
};
}