fix missing comfyui-frontend-package & spandrel packages in nixpkgs

This commit is contained in:
x807x 2025-03-18 17:14:39 +08:00
parent 762bd29942
commit 216a81ab8a
2 changed files with 40 additions and 3 deletions

View File

@ -17,12 +17,48 @@
config.allowUnfree = true; config.allowUnfree = true;
config.cudaSupport = true; config.cudaSupport = true;
}; };
python = pkgs.python3; python = let
packageOverrides = self: super:
{
"comfyui-frontend-package" = super.buildPythonPackage
{
pname = "comfyui-frontend-package";
version = "1.12.14";
src = fetchTarball {
url = "https://files.pythonhosted.org/packages/cc/33/0ca463657227a7538b8b1d924840e4e25307f8c8d20c683439d7ea97ba6d/comfyui_frontend_package-1.12.14.tar.gz";
sha256 = "1c5j01xqkzxqzj5nf646jrs7g095b0pzliy9b3b60wrspkaa2296";
};
propagatedBuildInputs = [
super.setuptools
];
COMFYUI_FRONTEND_VERSION = "1.12.14";
};
"spandrel" = super.buildPythonPackage {
pname = "spandrel";
pyproject = true;
version = "0.4.1";
src = fetchTarball {
url = "https://files.pythonhosted.org/packages/45/e0/048cd03119a9f2b685a79601a52311d5910ff6fd710c01f4ed6769a2892f/spandrel-0.4.1.tar.gz";
sha256 = "1byaq7mzjs27qhs9d7aw6xflqlj3qzm47mgawdxrlcw9qj4gk9w4";
};
buildInputs = [
super.torch
super.torchvision
super.safetensors
super.einops
];
};
};
in
pkgs.python3.override {
inherit packageOverrides;
self = python;
};
project = pyproject-nix.lib.project.loadRequirementsTxt { project = pyproject-nix.lib.project.loadRequirementsTxt {
projectRoot = ./.; projectRoot = ./.;
}; };
pythonEnv = assert project.validators.validateVersionConstraints {inherit python;} == {}; ( pythonEnv = assert project.validators.validateVersionConstraints {inherit python;} == {}; (
pkgs.python3.withPackages (project.renderers.withPackages { python.withPackages (project.renderers.withPackages {
inherit python; inherit python;
}) })
); );
@ -31,6 +67,7 @@
devShells.${system}.default = pkgs.mkShell { devShells.${system}.default = pkgs.mkShell {
packages = [ packages = [
pythonEnv pythonEnv
#(python.withPackages (ps: with ps; [ comfyui-frontend-package ]))
]; ];
}; };
}; };

View File

@ -19,6 +19,6 @@ psutil
#non essential dependencies: #non essential dependencies:
kornia>=0.7.1 kornia>=0.7.1
# spandrel spandrel
soundfile soundfile
av av