-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
opencomposite: init at unstable-2023-07-02 #245858
Conversation
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-ready-for-review/3032/2584 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi !
Thanks for your contribution.
I've left some comments, let me know if this is clear enough.
}; | ||
|
||
patches = [ | ||
./cmake-use-find_package-where-needed.patch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each patch in nixpkgs applied to the upstream source should be documented. Out-of-tree patches, fetched using fetchpatch
, are preferred.
In each patch comment, please explain the purpose of the patch and link to the relevant upstream issue if possible. If the patch has been merged upstream but is not yet part of the released version, please note the version number or date in the comment such that a future maintainer updating the nix expression will know whether the patch has been incorporated upstream and can thus be removed from nixpkgs.
Furthermore, please use a stable URL for the patch. Rather than, for example, linking to a GitHub pull request of the form https://github.com/owner/repo/pull/pr_number.patch
, which would change every time a commit is added or the PR is force-pushed, link to a specific commit patch in the form https://github.com/owner/repo/commit/sha.patch
.
Here are two good examples of patch comments:
mkDerivation {
…
patches = [
# Ensure RStudio compiles against R 4.0.0.
# Should be removed next 1.2.X RStudio update or possibly 1.3.X.
(fetchpatch {
url = "https://github.com/rstudio/rstudio/commit/3fb2397c2f208bb8ace0bbaf269481ccb96b5b20.patch";
sha256 = "0qpgjy6aash0fc0xbns42cwpj3nsw49nkbzwyq8az01xwg81g0f3";
})
];
}
mkDerivation {
…
patches = [
# Allow building with bison 3.7
# PR at https://github.com/GoldenCheetah/GoldenCheetah/pull/3590
(fetchpatch {
url = "https://github.com/GoldenCheetah/GoldenCheetah/commit/e1f42f8b3340eb4695ad73be764332e75b7bce90.patch";
sha256 = "1h0y9vfji5jngqcpzxna5nnawxs77i1lrj44w8a72j0ah0sznivb";
})
];
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I sadly don't have an upstream patch for this. I could try to improve the detection of system libraries in the upstream project before we merge this.
I am going to add a comment about the patch for now.
runHook postInstall | ||
''; | ||
|
||
meta = with lib; { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add the meta.mainProgram
attribute?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
opencomposite
doesn't have a binary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just realized, that the path didn't quite make sense. I have moved this to pkgs/development/libraries
instead, as it's really just an alternative implementation of openvr
016b09b
to
668505d
Compare
Signed-off-by: Sefa Eyeoglu <[email protected]>
668505d
to
01b54c0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Now in nixpkgs! NixOS/nixpkgs#245858 NixOS/nixpkgs#254754 Signed-off-by: Sefa Eyeoglu <[email protected]>
Description of changes
OpenComposite is a free and open source implementation of Valve's OpenVR on top of OpenXR.
Despite its name, OpenVR's "reference" implementation (SteamVR) is proprietary.
I also included a helper package (
opencomposite-helper
), that sets the appropriate environment variables to make it work with Proton games on Steam. I am not sure if we want to keep this in nixpkgs though.I personally tested this with the game Hot Dogs, Horseshoes & Hand Grenades (H3VR) on a Valve Index using my NixOS module proposed in #245005.
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)