mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 21:03:15 +00:00
8056f9250c
The setuptools-scm packages gained a setup hook, that sets it to the derivation version automatically, so setting it to that manually has become redundant. This also affects downstream consumers of setuptools-scm, like hatch-vcs or flit-scm.
55 lines
1.2 KiB
Nix
55 lines
1.2 KiB
Nix
{ lib
|
|
, stdenv
|
|
, python3
|
|
, fetchFromGitHub
|
|
, makeWrapper
|
|
, pkgs
|
|
}:
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
pname = "deface";
|
|
version = "1.4.0";
|
|
format = "pyproject";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ORB-HD";
|
|
repo = "deface";
|
|
rev = "v${version}";
|
|
hash = "sha256-tLNTgdnKKmyYHVajz0dHIb7cvC1by5LQ5CFIbMvPEYk=";
|
|
};
|
|
|
|
nativeBuildInputs = with python3.pkgs; [
|
|
setuptools-scm
|
|
];
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
imageio
|
|
imageio-ffmpeg
|
|
numpy
|
|
onnx
|
|
onnxruntime # Nixpkgs onnxruntime is missing CUDA support
|
|
opencv4
|
|
scikit-image
|
|
tqdm
|
|
];
|
|
|
|
# Native onnxruntime lib used by Python module onnxruntime can't find its other libs without this
|
|
makeWrapperArgs = [
|
|
''--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ pkgs.onnxruntime ]}"''
|
|
];
|
|
|
|
patchPhase = ''
|
|
substituteInPlace pyproject.toml requirements.txt --replace "opencv-python" "opencv"
|
|
'';
|
|
|
|
pythonImportsCheck = [ "deface" "onnx" "onnxruntime" ];
|
|
|
|
meta = with lib; {
|
|
description = "Video anonymization by face detection";
|
|
homepage = "https://github.com/ORB-HD/deface";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ lurkki ];
|
|
mainProgram = "deface";
|
|
};
|
|
}
|