Files
thesn10 fcdf15ae90 python3Packages.facenet-pytorch: fix version in setup.py
Assisted-by: Claude Code (claude-sonnet-5-5)
2026-11-09 19:56:29 +00:00

57 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
setuptools,
# dependencies
pillow,
requests,
torchvision,
}:
buildPythonPackage (finalAttrs: {
pname = "facenet-pytorch";
version = "2.5.3";
pyproject = true;
src = fetchFromGitHub {
owner = "timesler";
repo = "facenet-pytorch";
tag = "v${finalAttrs.version}";
hash = "sha256-3YVyqKgVLD5aePwyVQA8kOiqx32kqg9lxU2uwPWGkCU=";
};
postPatch = ''
substituteInPlace setup.py \
--replace-fail \
"VERSION = '2.5.2'" \
"VERSION = '${finalAttrs.version}'"
'';
build-system = [
setuptools
];
dependencies = [
pillow
requests
torchvision
];
pythonImportsCheck = [ "facenet_pytorch" ];
# The only tests require internet access
doCheck = false;
meta = {
description = "Pretrained Pytorch face detection (MTCNN) and facial recognition (InceptionResnet) models";
homepage = "https://github.com/timesler/facenet-pytorch";
changelog = "https://github.com/timesler/facenet-pytorch/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.mit;
maintainers = [ ];
};
})