nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 stdenv,
3 lib,
4 fetchFromGitHub,
5 pkg-config,
6 opencv,
7 spdlog,
8 onnxruntime,
9 libsForQt5,
10}:
11stdenv.mkDerivation {
12 pname = "aitrack";
13 version = "0.6.5";
14
15 src = fetchFromGitHub {
16 owner = "mdk97";
17 repo = "aitrack-linux";
18 rev = "00bcca9b685abf3a19e4eab653198ca2b1895ae4";
19 sha256 = "sha256-pPvYVLUPYdjtJKdxqZI+JN7OZ4xw9gZ3baYTnJUSTGE=";
20 };
21
22 nativeBuildInputs = [
23 pkg-config
24 libsForQt5.qmake
25 libsForQt5.wrapQtAppsHook
26 ];
27
28 buildInputs = [
29 opencv
30 spdlog
31 libsForQt5.qtx11extras
32 onnxruntime
33 ];
34
35 postPatch = ''
36 substituteInPlace Client/src/Main.cpp \
37 --replace "/usr/share/" "$out/share/"
38 '';
39
40 postInstall = ''
41 install -Dt $out/bin aitrack
42 install -Dt $out/share/aitrack/models models/*
43 '';
44
45 meta = {
46 description = "6DoF Head tracking software";
47 mainProgram = "aitrack";
48 maintainers = with lib.maintainers; [ ck3d ];
49 platforms = lib.platforms.linux;
50 license = lib.licenses.mit;
51 };
52}