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

steamvr: init #341095

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Draft

steamvr: init #341095

wants to merge 9 commits into from

Conversation

Pandapip1
Copy link
Contributor

Description of changes

I have been given permission to package SteamVR by a Valve employee.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • 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/)
  • 24.11 Release Notes (or backporting 23.11 and 24.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.

Add a 👍 reaction to pull requests you find important.

@Pandapip1
Copy link
Contributor Author

CC @Scrumplex

@Scrumplex
Copy link
Member

This is jaw dropping. I never even considered packaging Steam apps like this xD

fileList ? [ ],
fileListRegex ? false,
debug ? false,
hash ? lib.fakeHash,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
hash ? lib.fakeHash,
hash ? "",

This is more inline with fetchers like fetchCargoTarball and pnpm.fetchDeps

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think the added complexity of doing it that way is particularly worth it. Those fetchers probably predate lib.fakeHash, so they chose the way that was simpler back then.

If you want to block on this, I'll change it, but I'd strongly prefer to keep it this way.

}:

runCommand name
{
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
{
({

Copy link
Contributor Author

@Pandapip1 Pandapip1 Sep 10, 2024

Choose a reason for hiding this comment

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

What does this accomplish?

EDIT: Figured it out. See #341095 (comment)

Comment on lines 29 to 31
outputHash = hash;
outputHashAlgo = "sha256";
outputHashMode = "recursive";
}
Copy link
Member

Choose a reason for hiding this comment

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

it also doesn't force a sha256 hash

Suggested change
outputHash = hash;
outputHashAlgo = "sha256";
outputHashMode = "recursive";
}
outputHash = hash;
outputHashMode = "recursive";
}
// lib.optionalAttrs (hash == "") { outputHashAlgo = "sha256"; })

pkgs/build-support/fetchsteam/default.nix Outdated Show resolved Hide resolved
pkgs/build-support/fetchsteam/default.nix Outdated Show resolved Hide resolved
pkgs/development/libraries/readline/6.3.nix Outdated Show resolved Hide resolved
@NyCodeGHG
Copy link
Member

This looks pretty cool, but is there an advantage in using this over using SteamVR from the steam client?
(also fetchSteam in nixpkgs is nice)

@Scrumplex
Copy link
Member

This looks pretty cool, but is there an advantage in using this over using SteamVR from the steam client? (also fetchSteam in nixpkgs is nice)

SteamVR inside Steam's fhsenv suffers from #217119, which means you won't be able to use asynchronous reprojection without bad workarounds.

@NyCodeGHG
Copy link
Member

This looks pretty cool, but is there an advantage in using this over using SteamVR from the steam client? (also fetchSteam in nixpkgs is nice)

SteamVR inside Steam's fhsenv suffers from #217119, which means you won't be able to use asynchronous reprojection without bad workarounds.

Ah, i see. thank your for explaining :)

@Pandapip1
Copy link
Contributor Author

Additionally, this will allow other packages such as ALVR to depend on SteamVR.

Copy link
Member

@Atemu Atemu left a comment

Choose a reason for hiding this comment

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

This is quite amazing. Thanks a bunch.

I see two things that must to be done here:

  1. We need a written record of Valve approving us to package SteamVR using patchelf. This doesn't need to be formal but some record we can point at to say "We're allowed to do this.". Precedent:
    /*
    License issues:
    Date: Mon, 10 Dec 2007 19:55:16 -0500
    From: TeamSpeak Sales <[email protected]>
    To: 'Marc Weber' <[email protected]>
    Subject: RE: teamspeak on nix?
    Yes, that would be fine. As long as you are not renting servers or selling
    TeamSpeak then you are more than welcome to distribute it.
    Thank you,
    TeamSpeak Sales Team
    ________________________________
    e-Mail: [email protected]
    TeamSpeak: http://www.TeamSpeak.com
    Account Login: https://sales.TritonCIA.com/users
    -----Original Message-----
    From: Marc Weber [mailto:[email protected]]
    Sent: Monday, December 10, 2007 5:03 PM
    To: [email protected]
    Subject: teamspeak on nix?
    Hello,
    nix is very young software distribution system (http://nix.cs.uu.nl/)
    I'd like to ask wether you permit us to add teamspeak (server/ client?)
    Sincerly
    Marc Weber (small nix contributor)
    */
  2. There needs to be documentation on the update procedure or, even better, an automatic updater.

@Pandapip1
Copy link
Contributor Author

Pandapip1 commented Sep 16, 2024

Well, here's the conversation, for now:


From: John, Gavin N. (Gavin) [email protected]
To: [email protected]
Subject: Permission to package SteamVR

Hi Valve VR folks,

I'm Gavin, an incoming freshman at Caltech. In my free time, I like to package programs for nixpkgs, the package repository for the nix package manager and its NixOS linux distribution.

I initially planned to package it by downloading it using depotdownloader, but discovered that SteamVR can't be downloaded in its entirety using anonymous accounts. This led me to discover the SteamVR licensing page, which had this email address.

Would you be okay with me modifying and distributing my copy of SteamVR for the purpose of making it available to install through nixpkgs? Nixpkgs has a mechanism to keep track of licenses that users have agreed to, so installation of SteamVR can require agreement to the Steam Subscriber Agreement, the Steam PC Café Agreement, and/or the SteamVR Commercial Installation License.

Thank you for your consideration!

Sincerely,

Gavin John


From: Ben Jackson [email protected]
Sent: Tuesday, September 10, 2024 10:38:22 AM
To: John, Gavin N. (Gavin) [email protected]
Subject: Re: Permission to package SteamVR

  • I initially planned to package it by downloading it using depotdownloader, but discovered that SteamVR can't be downloaded in its entirety using anonymous accounts.

Thanks for bringing this to our attention. I have fixed that issue.

  • Would you be okay with me modifying and distributing my copy of SteamVR for the purpose of making it available to install through nixpkgs?

We would rather avoid that. I assume if depotdownloader works again, this would no longer be preferably anyway.

--Ben


From: John, Gavin N. (Gavin) [email protected]
Sent: Tuesday, September 10, 2024 10:53 AM
To: Ben Jackson [email protected]
Subject: [External Mail] Re: Permission to package SteamVR

Hi Ben,

Thank you for your response! Thanks for fixing the issue with depot downloader. That's going to help a lot.

Some modifications to SteamVR will be necessary to make all functionality work with NixOS. Do I have permission to make a configuration file and script that makes the necessary modifications, and to have the config file and script distributed?

Thank you!

Sincerely,

Gavin


From: Ben Jackson [email protected]
To: "'John, Gavin N. (Gavin)'" [email protected]
Subject: RE: Permission to package SteamVR

It's fine to distribute patches that apply after downloading the base content.

If there are specific issues that you think are generic issues regarding portability you can also send them my way.

@Pandapip1
Copy link
Contributor Author

Pandapip1 commented Sep 16, 2024

I'm aware the packages I just added are missing some necessary things, such as formatting and meta. That's why this PR is a draft. For the time being, please refrain from leaving reviews on stuff that obviously needs changing.

Those packages will be necessary for the update script.

@Pandapip1 Pandapip1 force-pushed the init-steamvr branch 4 times, most recently from 7786606 to bea47b4 Compare September 16, 2024 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants