diff options
author | Francesco Zanini <francesco@zanini.me> | 2021-05-05 09:04:10 +0200 |
---|---|---|
committer | Francesco Zanini <francesco@zanini.me> | 2021-05-22 09:09:56 +0200 |
commit | 3eb8ad2278174bd38c0abf14711b50959f85996d (patch) | |
tree | f819791d418020f7eba2f81d4e304b769384b428 | |
parent | 1c563249ea79e8ec35450d8805f187edefeb4bfa (diff) |
opentrack: init at 2.3.13
-rw-r--r-- | pkgs/applications/misc/opentrack/aruco.nix | 35 | ||||
-rw-r--r-- | pkgs/applications/misc/opentrack/default.nix | 58 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
3 files changed, 95 insertions, 0 deletions
diff --git a/pkgs/applications/misc/opentrack/aruco.nix b/pkgs/applications/misc/opentrack/aruco.nix new file mode 100644 index 0000000000000..9a315a1320736 --- /dev/null +++ b/pkgs/applications/misc/opentrack/aruco.nix @@ -0,0 +1,35 @@ +{ lib, stdenv, cmake, fetchFromGitHub, opencv4 }: + +stdenv.mkDerivation { + pname = "opentrack-aruco"; + version = "unstable-20190303"; + + src = fetchFromGitHub { + owner = "opentrack"; + repo = "aruco"; + rev = "12dc60efd61149227bd05c805208d9bcce308f6d"; + sha256 = "0gkrixgfbpg8pls4qqilphbz4935mg5z4p18a0vv6kclmfccw9ad"; + }; + + nativeBuildInputs = [ cmake ]; + + buildInputs = [ opencv4 ]; + + NIX_CFLAGS_COMPILE = "-Wall -Wextra -Wpedantic -ffast-math -march=native -O3"; + + preInstall = '' + mkdir -p $out/include/aruco + ''; + + # copy headers required by main package + postInstall = '' + cp $src/src/*.h $out/include/aruco + ''; + + meta = with lib; { + homepage = "https://github.com/opentrack/aruco"; + description = "C++ library for detection of AR markers based on OpenCV"; + license = licenses.isc; + maintainers = with maintainers; [ zaninime ]; + }; +} diff --git a/pkgs/applications/misc/opentrack/default.nix b/pkgs/applications/misc/opentrack/default.nix new file mode 100644 index 0000000000000..9bef85c2b249c --- /dev/null +++ b/pkgs/applications/misc/opentrack/default.nix @@ -0,0 +1,58 @@ +{ mkDerivation, lib, callPackage, fetchzip, fetchFromGitHub, cmake, pkg-config +, ninja, copyDesktopItems, qtbase, qttools, opencv4, procps, eigen, libXdmcp +, libevdev, makeDesktopItem, fetchurl }: + +let + version = "2.3.13"; + + aruco = callPackage ./aruco.nix { }; + + # license.txt inside the zip file is MIT + xplaneSdk = fetchzip { + url = "https://developer.x-plane.com/wp-content/plugins/code-sample-generation/sample_templates/XPSDK303.zip"; + sha256 = "11wqjsr996c5qhiv2djsd55gc373a9qcq30dvc6rhzm0fys42zba"; + }; + +in mkDerivation { + pname = "opentrack"; + inherit version; + + src = fetchFromGitHub { + owner = "opentrack"; + repo = "opentrack"; + rev = "opentrack-${version}"; + sha256 = "1s986lmm5l1pwbwvd1pfiq84n32s1q1dav7a0cbga4d1vcf0v1ay"; + }; + + nativeBuildInputs = [ cmake pkg-config ninja copyDesktopItems ]; + buildInputs = [ qtbase qttools opencv4 procps eigen libXdmcp libevdev aruco ]; + + NIX_CFLAGS_COMPILE = "-Wall -Wextra -Wpedantic -ffast-math -march=native -O3"; + + cmakeFlags = [ + "-DCMAKE_BUILD_TYPE=RELEASE" + "-DSDK_ARUCO_LIBPATH=${aruco}/lib/libaruco.a" + "-DSDK_XPLANE=${xplaneSdk}" + ]; + + desktopItems = [ + (makeDesktopItem rec { + name = "opentrack"; + exec = "opentrack"; + icon = fetchurl { + url = "https://github.com/opentrack/opentrack/raw/opentrack-${version}/gui/images/opentrack.png"; + sha256 = "0d114zk78f7nnrk89mz4gqn7yk3k71riikdn29w6sx99h57f6kgn"; + }; + desktopName = name; + genericName = "Head tracking software"; + categories = "Utility;"; + }) + ]; + + meta = with lib; { + homepage = "https://github.com/opentrack/opentrack"; + description = "Head tracking software for MS Windows, Linux, and Apple OSX"; + license = licenses.isc; + maintainers = with maintainers; [ zaninime ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7916e7d321199..8944648df8e25 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7334,6 +7334,8 @@ in opensp = callPackage ../tools/text/sgml/opensp { }; + opentrack = libsForQt5.callPackage ../applications/misc/opentrack { }; + opentracker = callPackage ../applications/networking/p2p/opentracker { }; opentsdb = callPackage ../tools/misc/opentsdb {}; |