base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / de / deface / package.nix
blob5b80ed6e2528c3ad07d8a8c92385e49f6fdf26e6
1 { lib
2 , stdenv
3 , python3
4 , fetchFromGitHub
5 , pkgs
6 }:
8 python3.pkgs.buildPythonApplication rec {
9   pname = "deface";
10   version = "1.5.0";
11   pyproject = true;
13   disabled = python3.pythonOlder "3.8";
15   src = fetchFromGitHub {
16     owner = "ORB-HD";
17     repo = "deface";
18     rev = "refs/tags/v${version}";
19     hash = "sha256-/mXWeL6OSgW4BMXtAZD/3UxQUGt7UE5ZvH8CXNCueJo=";
20   };
22   build-system = with python3.pkgs; [
23     setuptools-scm
24   ];
26   dependencies = with python3.pkgs; [
27     imageio
28     imageio-ffmpeg
29     numpy
30     onnx
31     onnxruntime # Nixpkgs onnxruntime is missing CUDA support
32     opencv-python
33     scikit-image
34     tqdm
35   ];
37   # Native onnxruntime lib used by Python module onnxruntime can't find its other libs without this
38   makeWrapperArgs = [
39     ''--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ pkgs.onnxruntime ]}"''
40   ];
42   pythonImportsCheck = [ "deface" "onnx" "onnxruntime" ];
44   meta = {
45     description = "Video anonymization by face detection";
46     homepage = "https://github.com/ORB-HD/deface";
47     changelog = "https://github.com/ORB-HD/deface/releases/tag/v${version}";
48     license = lib.licenses.mit;
49     maintainers = with lib.maintainers; [ lurkki ];
50     mainProgram = "deface";
51     # terminate called after throwing an instance of 'onnxruntime::OnnxRuntimeException'
52     broken = stdenv.hostPlatform.system == "aarch64-linux";
53   };