nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv
2, lib
3, fetchFromGitHub
4, pkg-config
5, qmake
6, wrapQtAppsHook
7, opencv
8, spdlog
9, onnxruntime
10, qtx11extras
11}: stdenv.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 qmake
25 wrapQtAppsHook
26 ];
27
28 buildInputs = [
29 opencv
30 spdlog
31 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 = with lib; {
46 description = "6DoF Head tracking software";
47 maintainers = with maintainers; [ ck3d ];
48 platforms = platforms.linux;
49 license = licenses.mit;
50 };
51}