1{ lib
2, stdenv
3, fetchFromGitHub
4, unzip
5, cmake
6, darwin
7, libGLU
8, libGL
9}:
10
11stdenv.mkDerivation rec {
12 pname = "vrpn";
13 version = "07.35";
14
15 src = fetchFromGitHub {
16 owner = "vrpn";
17 repo = "vrpn";
18 rev = "version_${version}";
19 hash = "sha256-vvlwhm5XHWD4Nh1hwY427pe36RQaqTDJiEtkCxHeCig=";
20 };
21
22 nativeBuildInputs = [
23 cmake
24 unzip
25 ];
26
27 buildInputs = lib.optionals stdenv.isDarwin [
28 darwin.apple_sdk.frameworks.CoreFoundation
29 darwin.apple_sdk.frameworks.GLUT
30 darwin.apple_sdk.frameworks.IOKit
31 darwin.apple_sdk.frameworks.OpenGL
32 ] ++ lib.optionals stdenv.isLinux [
33 libGLU
34 libGL
35 ];
36
37 meta = with lib; {
38 description = "Virtual Reality Peripheral Network";
39 longDescription = ''
40 The Virtual-Reality Peripheral Network (VRPN) is a set of classes
41 within a library and a set of servers that are designed to implement
42 a network-transparent interface between application programs and the
43 set of physical devices (tracker, etc.) used in a virtual-reality
44 (VR) system.
45 '';
46 homepage = "https://github.com/vrpn/vrpn";
47 license = licenses.boost; # see https://github.com/vrpn/vrpn/wiki/License
48 platforms = platforms.darwin ++ platforms.linux;
49 maintainers = with maintainers; [ ludo ];
50 };
51}