tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
deface: init at 1.4.0
Jussi Kuokkanen
2 years ago
7a7bf33e
d14dd2e9
+58
2 changed files
expand all
collapse all
unified
split
pkgs
applications
video
deface
default.nix
top-level
all-packages.nix
+56
pkgs/applications/video/deface/default.nix
···
1
1
+
{ lib
2
2
+
, stdenv
3
3
+
, python3
4
4
+
, fetchFromGitHub
5
5
+
, makeWrapper
6
6
+
, pkgs
7
7
+
}:
8
8
+
9
9
+
python3.pkgs.buildPythonApplication rec {
10
10
+
pname = "deface";
11
11
+
version = "1.4.0";
12
12
+
format = "pyproject";
13
13
+
14
14
+
src = fetchFromGitHub {
15
15
+
owner = "ORB-HD";
16
16
+
repo = "deface";
17
17
+
rev = "v${version}";
18
18
+
hash = "sha256-tLNTgdnKKmyYHVajz0dHIb7cvC1by5LQ5CFIbMvPEYk=";
19
19
+
};
20
20
+
21
21
+
nativeBuildInputs = with python3.pkgs; [
22
22
+
setuptools-scm
23
23
+
];
24
24
+
25
25
+
propagatedBuildInputs = with python3.pkgs; [
26
26
+
imageio
27
27
+
imageio-ffmpeg
28
28
+
numpy
29
29
+
onnx
30
30
+
onnxruntime # Nixpkgs onnxruntime is missing CUDA support
31
31
+
opencv4
32
32
+
scikit-image
33
33
+
tqdm
34
34
+
];
35
35
+
36
36
+
# Native onnxruntime lib used by Python module onnxruntime can't find its other libs without this
37
37
+
makeWrapperArgs = [
38
38
+
''--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ pkgs.onnxruntime ]}"''
39
39
+
];
40
40
+
41
41
+
patchPhase = ''
42
42
+
substituteInPlace pyproject.toml requirements.txt --replace "opencv-python" "opencv"
43
43
+
'';
44
44
+
45
45
+
# Let setuptools know deface version
46
46
+
SETUPTOOLS_SCM_PRETEND_VERSION = "v${version}";
47
47
+
48
48
+
pythonImportsCheck = [ "deface" "onnx" "onnxruntime" ];
49
49
+
50
50
+
meta = with lib; {
51
51
+
description = "Video anonymization by face detection";
52
52
+
homepage = "https://github.com/ORB-HD/deface";
53
53
+
license = licenses.mit;
54
54
+
maintainers = with maintainers; [ lurkki ];
55
55
+
};
56
56
+
}
+2
pkgs/top-level/all-packages.nix
···
41866
41866
41867
41867
ov = callPackage ../tools/text/ov { };
41868
41868
41869
41869
+
deface = callPackage ../applications/video/deface { };
41870
41870
+
41869
41871
tubekit = callPackage ../applications/networking/cluster/tubekit/wrapper.nix { };
41870
41872
41871
41873
tubekit-unwrapped = callPackage ../applications/networking/cluster/tubekit { };