14 stdenv.mkDerivation (finalAttrs: {
18 src = fetchFromGitHub {
19 owner = "ValveSoftware";
21 rev = "v${finalAttrs.version}";
22 hash = "sha256-bIKjZ7DvJVmDK386WgXaAFQrS0E1TNEUMhfQp7FNnvk=";
26 # https://github.com/ValveSoftware/openvr/pull/594
28 name = "use-correct-CPP11-definition-for-vsprintf_s.patch";
29 url = "https://github.com/ValveSoftware/openvr/commit/0fa21ba17748efcca1816536e27bdca70141b074.patch";
30 hash = "sha256-0sPNDx5qKqCzN35FfArbgJ0cTztQp+SMLsXICxneLx4=";
32 # https://github.com/ValveSoftware/openvr/pull/1716
34 name = "add-ability-to-build-with-system-installed-jsoncpp.patch";
35 url = "https://github.com/ValveSoftware/openvr/commit/54a58e479f4d63e62e9118637cd92a2013a4fb95.patch";
36 hash = "sha256-aMojjbNjLvsGev0JaBx5sWuMv01sy2tG/S++I1NUi7U=";
41 # Move in-tree jsoncpp out to complement the patch above
42 # fetchpatch2 is not able to handle these renames
43 mkdir source/thirdparty
44 mv source/src/json source/thirdparty/jsoncpp
56 ++ lib.optionals stdenv.hostPlatform.isDarwin [
62 "-DUSE_SYSTEM_JSONCPP=ON"
66 passthru.updateScript = nix-update-script { };
69 broken = stdenv.hostPlatform.isDarwin;
70 description = "API and runtime that allows access to VR hardware from multiple vendors without requiring that applications have specific knowledge of the hardware they are targeting";
71 homepage = "https://github.com/ValveSoftware/openvr";
72 license = lib.licenses.bsd3;
73 maintainers = with lib.maintainers; [ Scrumplex ];
74 platforms = lib.platforms.unix;