-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.nix
42 lines (37 loc) · 905 Bytes
/
package.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{
lib,
python3Packages,
torch,
mmcv,
mmdet,
mmpose,
anime-face-models,
}:
let
inherit (torch) cudaSupport;
in
python3Packages.buildPythonApplication {
pname = "anime-face-detector";
version = "1.0.0";
src = ./.;
postPatch = ''
substituteInPlace anime_face_detector/__init__.py \
--replace 'os.environ.get("MODEL_PATH")' '"${anime-face-models}"'
substituteInPlace cli.py \
--replace 'os.environ.get("CUDA_SUPPORT")' '"${toString cudaSupport}"'
'';
nativeBuildInputs = with python3Packages; [ setuptools ];
propagatedBuildInputs = [
mmcv
mmdet
mmpose
torch
];
meta = with lib; {
description = "CLI for hysts/anime-face-detector";
homepage = "https://github.com/iynaix/anime-face-detector";
license = with licenses; [ mit ];
maintainers = with maintainers; [ iynaix ];
mainProgram = "anime-face-detector";
};
}