mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-06 04:53:27 +00:00
4f0dadbf38
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
77 lines
2.0 KiB
Nix
77 lines
2.0 KiB
Nix
{
|
|
AppKit,
|
|
cmake,
|
|
fetchFromGitHub,
|
|
fetchpatch2,
|
|
Foundation,
|
|
jsoncpp,
|
|
lib,
|
|
libGL,
|
|
stdenv,
|
|
nix-update-script,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "openvr";
|
|
version = "2.5.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ValveSoftware";
|
|
repo = "openvr";
|
|
rev = "v${finalAttrs.version}";
|
|
hash = "sha256-bIKjZ7DvJVmDK386WgXaAFQrS0E1TNEUMhfQp7FNnvk=";
|
|
};
|
|
|
|
patches = [
|
|
# https://github.com/ValveSoftware/openvr/pull/594
|
|
(fetchpatch2 {
|
|
name = "use-correct-CPP11-definition-for-vsprintf_s.patch";
|
|
url = "https://github.com/ValveSoftware/openvr/commit/0fa21ba17748efcca1816536e27bdca70141b074.patch";
|
|
hash = "sha256-0sPNDx5qKqCzN35FfArbgJ0cTztQp+SMLsXICxneLx4=";
|
|
})
|
|
# https://github.com/ValveSoftware/openvr/pull/1716
|
|
(fetchpatch2 {
|
|
name = "add-ability-to-build-with-system-installed-jsoncpp.patch";
|
|
url = "https://github.com/ValveSoftware/openvr/commit/54a58e479f4d63e62e9118637cd92a2013a4fb95.patch";
|
|
hash = "sha256-aMojjbNjLvsGev0JaBx5sWuMv01sy2tG/S++I1NUi7U=";
|
|
})
|
|
];
|
|
|
|
postUnpack = ''
|
|
# Move in-tree jsoncpp out to complement the patch above
|
|
# fetchpatch2 is not able to handle these renames
|
|
mkdir source/thirdparty
|
|
mv source/src/json source/thirdparty/jsoncpp
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
];
|
|
|
|
buildInputs =
|
|
[
|
|
jsoncpp
|
|
libGL
|
|
]
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
AppKit
|
|
Foundation
|
|
];
|
|
|
|
cmakeFlags = [
|
|
"-DUSE_SYSTEM_JSONCPP=ON"
|
|
"-DBUILD_SHARED=1"
|
|
];
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = {
|
|
broken = stdenv.hostPlatform.isDarwin;
|
|
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";
|
|
homepage = "https://github.com/ValveSoftware/openvr";
|
|
license = lib.licenses.bsd3;
|
|
maintainers = with lib.maintainers; [ Scrumplex ];
|
|
platforms = lib.platforms.unix;
|
|
};
|
|
})
|