opentrack: move to by-name, 2023.3.0 -> 2024.1.1-unstable-2025-10-29 (#456771)

This commit is contained in:
Sandro
2025-10-31 10:06:06 +00:00
committed by GitHub
4 changed files with 128 additions and 127 deletions

View File

@@ -1,111 +0,0 @@
{
pkgs,
mkDerivation,
lib,
callPackage,
fetchzip,
fetchFromGitHub,
cmake,
pkg-config,
ninja,
copyDesktopItems,
qtbase,
qttools,
opencv4,
procps,
eigen,
libXdmcp,
libevdev,
makeDesktopItem,
fetchurl,
fetchpatch,
wineWowPackages,
onnxruntime,
}:
let
version = "2023.3.0";
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/sdk_zip_files/XPSDK401.zip";
hash = "sha256-tUT9yV1949QVr5VebU/7esg7wwWkyak2TSA/kQSrbeo=";
};
in
mkDerivation {
pname = "opentrack";
inherit version;
src = fetchFromGitHub {
owner = "opentrack";
repo = "opentrack";
rev = "opentrack-${version}";
hash = "sha256-C0jLS55DcLJh/e5yM8kLG7fhhKvBNllv5HkfCWRIfc4=";
};
patches = [
# https://github.com/opentrack/opentrack/pull/1754
(fetchpatch {
url = "https://github.com/opentrack/opentrack/commit/d501d7e0b237ed0c305525788b423d842ffa356d.patch";
hash = "sha256-XMGHV78vt/Xn3hS+4V//pqtsdBQCfJPjIXxfwtdXX+Q=";
})
];
nativeBuildInputs = [
cmake
pkg-config
ninja
copyDesktopItems
];
buildInputs = [
qtbase
qttools
opencv4
procps
eigen
libXdmcp
libevdev
aruco
onnxruntime
]
++ lib.optionals pkgs.stdenv.targetPlatform.isx86_64 [ wineWowPackages.stable ];
env.NIX_CFLAGS_COMPILE = "-Wall -Wextra -Wpedantic -ffast-math -O3";
dontWrapQtApps = true;
cmakeFlags = [
"-GNinja"
"-DCMAKE_BUILD_TYPE=Release"
"-DSDK_ARUCO_LIBPATH=${aruco}/lib/libaruco.a"
"-DSDK_XPLANE=${xplaneSdk}"
]
++ lib.optionals pkgs.stdenv.targetPlatform.isx86_64 [ "-DSDK_WINE=ON" ];
postInstall = ''
wrapQtApp $out/bin/opentrack
'';
desktopItems = [
(makeDesktopItem rec {
name = "opentrack";
exec = "opentrack";
icon = fetchurl {
url = "https://github.com/opentrack/opentrack/raw/opentrack-${version}/gui/images/opentrack.png";
hash = "sha256-9k3jToEpdW14ErbNGHM4c0x/LH7k14RmtvY4dOYnITQ=";
};
desktopName = name;
genericName = "Head tracking software";
categories = [ "Utility" ];
})
];
meta = {
homepage = "https://github.com/opentrack/opentrack";
description = "Head tracking software for MS Windows, Linux, and Apple OSX";
mainProgram = "opentrack";
changelog = "https://github.com/opentrack/opentrack/releases/tag/${version}";
license = lib.licenses.isc;
maintainers = with lib.maintainers; [ zaninime ];
};
}

View File

@@ -4,38 +4,39 @@
cmake,
fetchFromGitHub,
opencv4,
opentrack,
}:
stdenv.mkDerivation {
pname = "opentrack-aruco";
version = "unstable-20190303";
version = "0-unstable-2022-03-10";
src = fetchFromGitHub {
owner = "opentrack";
repo = "aruco";
rev = "12dc60efd61149227bd05c805208d9bcce308f6d";
sha256 = "0gkrixgfbpg8pls4qqilphbz4935mg5z4p18a0vv6kclmfccw9ad";
rev = "e08d336bd2c70859efd19622582817fe8eabe714";
hash = "sha256-Wf5y//vxRWIZfOxwgZsPPTsUHliA3cbt2FOjouh4/rQ=";
};
strictDeps = true;
nativeBuildInputs = [ cmake ];
buildInputs = [ opencv4 ];
env.NIX_CFLAGS_COMPILE = "-Wall -Wextra -Wpedantic -ffast-math -O3";
preInstall = ''
mkdir -p $out/include/aruco
installPhase = ''
runHook preInstall
install -Dt $out/include/aruco ./src/include/aruco/*
install -Dt $out/lib ./src/libaruco.a
runHook postInstall
'';
# copy headers required by main package
postInstall = ''
cp $src/src/*.h $out/include/aruco
'';
meta = with lib; {
meta = {
homepage = "https://github.com/opentrack/aruco";
description = "C++ library for detection of AR markers based on OpenCV";
license = licenses.isc;
maintainers = with maintainers; [ zaninime ];
license = lib.licenses.isc;
maintainers = opentrack.meta.maintainers;
};
}

View File

@@ -0,0 +1,113 @@
{
stdenv,
lib,
callPackage,
fetchzip,
fetchFromGitHub,
cmake,
pkg-config,
ninja,
copyDesktopItems,
qt6,
opencv4,
procps,
eigen,
libXdmcp,
libevdev,
makeDesktopItem,
wineWowPackages,
onnxruntime,
nix-update-script,
withWine ? stdenv.targetPlatform.isx86_64,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "opentrack";
version = "2024.1.1-unstable-2025-10-29";
src = fetchFromGitHub {
owner = "opentrack";
repo = "opentrack";
rev = "766808196cf63ddf9ceb102fba193582daceb9de";
hash = "sha256-xS87LFAbnRg7uBbN7ARoGts3bNYkcpOm3xhojBepgIo=";
};
aruco = callPackage ./aruco.nix { };
xplaneSdk = fetchzip {
url = "https://developer.x-plane.com/wp-content/plugins/code-sample-generation/sdk_zip_files/XPSDK411.zip";
hash = "sha256-zay5QrHJctllVFl+JhlyTDzH68h5UoxncEt+TpW3UgI=";
# see license.txt inside the zip file
meta.license = lib.licenses.free;
};
strictDeps = true;
nativeBuildInputs = [
cmake
copyDesktopItems
ninja
pkg-config
qt6.wrapQtAppsHook
]
++ lib.optionals withWine [ wineWowPackages.stable ];
buildInputs = [
finalAttrs.aruco
eigen
libXdmcp
libevdev
onnxruntime
opencv4
procps
qt6.qtbase
qt6.qttools
];
cmakeFlags = [
(lib.cmakeBool "SDK_WINE" withWine)
(lib.cmakeFeature "SDK_ARUCO_LIBPATH" "${finalAttrs.aruco}/lib/libaruco.a")
(lib.cmakeFeature "SDK_XPLANE" finalAttrs.xplaneSdk.outPath)
];
postInstall = ''
install -Dt $out/share/icons/hicolor/256x256 $src/gui/images/opentrack.png
'';
# manually wrap just the main binary
dontWrapQtApps = true;
preFixup = ''
wrapQtApp $out/bin/opentrack
'';
desktopItems = [
(makeDesktopItem {
name = "opentrack";
exec = "opentrack";
icon = "opentrack";
desktopName = "opentrack";
genericName = "Head tracking software";
categories = [ "Utility" ];
})
];
passthru.updateScript = nix-update-script {
extraArgs = [
"--version=branch"
"--version-regex"
"^opentrack-(.+)"
];
};
meta = {
homepage = "https://github.com/opentrack/opentrack";
description = "Head tracking software for MS Windows, Linux, and Apple OSX";
mainProgram = "opentrack";
changelog = "https://github.com/opentrack/opentrack/releases";
license = lib.licenses.isc;
maintainers = [
lib.maintainers.nekowinston
lib.maintainers.zaninime
];
platforms = lib.platforms.linux;
};
})

View File

@@ -3633,8 +3633,6 @@ with pkgs;
sshd-openpgp-auth = callPackage ../by-name/ss/ssh-openpgp-auth/daemon.nix { };
opentrack = libsForQt5.callPackage ../applications/misc/opentrack { };
openvpn = callPackage ../tools/networking/openvpn { };
openvpn_learnaddress = callPackage ../tools/networking/openvpn/openvpn_learnaddress.nix { };