Skip to content
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

Merged
merged 1 commit into from
Sep 11, 2023
Merged

Conversation

Scrumplex
Copy link
Member

@Scrumplex Scrumplex commented Jul 28, 2023

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
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Jul 28, 2023
@nixos-discourse
Copy link

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

@Scrumplex Scrumplex added the needs_reviewer (old Marvin label, do not use) label Aug 31, 2023
Copy link
Contributor

@drupol drupol left a 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
Copy link
Contributor

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";
    })
  ];
}

Copy link
Member Author

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; {
Copy link
Contributor

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?

Copy link
Member Author

@Scrumplex Scrumplex Sep 11, 2023

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

Copy link
Member Author

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

Copy link
Contributor

@drupol drupol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@delroth delroth added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Sep 11, 2023
@drupol drupol merged commit 437c962 into NixOS:master Sep 11, 2023
@Scrumplex Scrumplex deleted the opencomposite branch September 11, 2023 16:37
Scrumplex added a commit to Scrumplex/pkgs that referenced this pull request Sep 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 11.by: package-maintainer This PR was created by the maintainer of the package it changes 12.approvals: 1 This PR was reviewed and approved by one reputable person needs_reviewer (old Marvin label, do not use)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants