-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
base: master
Are you sure you want to change the base?
steamvr: init #341095
Conversation
4aa06c0
to
4164dcb
Compare
CC @Scrumplex |
4164dcb
to
7a457ea
Compare
This is jaw dropping. I never even considered packaging Steam apps like this xD |
fileList ? [ ], | ||
fileListRegex ? false, | ||
debug ? false, | ||
hash ? lib.fakeHash, |
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.
hash ? lib.fakeHash, | |
hash ? "", |
This is more inline with fetchers like fetchCargoTarball
and pnpm.fetchDeps
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 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.
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.
See the new comment. We can take advantage of the newly added lib.fetchers.withNormalizedHash
to handle all of this logic for us (including the ""
case)
}: | ||
|
||
runCommand name | ||
{ |
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.
{ | |
({ |
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.
What does this accomplish?
EDIT: Figured it out. See #341095 (comment)
outputHash = hash; | ||
outputHashAlgo = "sha256"; | ||
outputHashMode = "recursive"; | ||
} |
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.
it also doesn't force a sha256 hash
outputHash = hash; | |
outputHashAlgo = "sha256"; | |
outputHashMode = "recursive"; | |
} | |
outputHash = hash; | |
outputHashMode = "recursive"; | |
} | |
// lib.optionalAttrs (hash == "") { outputHashAlgo = "sha256"; }) |
26db564
to
1e0d81f
Compare
This looks pretty cool, but is there an advantage in using this over using SteamVR from the steam client? |
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 :) |
Additionally, this will allow other packages such as ALVR to depend on SteamVR. |
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.
This is quite amazing. Thanks a bunch.
I see two things that must to be done here:
- 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:nixpkgs/pkgs/applications/networking/instant-messengers/teamspeak/client.nix
Lines 123 to 156 in 1372130
/* 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) */ - There needs to be documentation on the update procedure or, even better, an automatic updater.
Well, here's the conversation, for now: From: John, Gavin N. (Gavin) [email protected] 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]
Thanks for bringing this to our attention. I have fixed that issue.
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] 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] 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. |
I'm aware the packages I just added are missing some necessary things, such as formatting and Those packages will be necessary for the update script. |
bea47b4
to
ec926fd
Compare
ec926fd
to
3468b79
Compare
0f45302
to
d343341
Compare
This reverts commit ff9ecc8.
Co-authored-by: seth <[email protected]>
d343341
to
bf942b5
Compare
According to SteamRE/DepotDownloader#566 (comment), there's an issue with our current version of depotdownloader. Therefore, this PR is kind of blocked on the dotnet SDK 9 packaging effort (I don't actually see a PR or open issue though?!) |
sorry, was misinformed on that last count; 2.7.4 is in the works! #359705 |
writeText, | ||
}: | ||
|
||
{ |
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.
{ | |
lib.makeOverridable (lib.fetchers.withNormalizedHash { } { |
fileList ? [ ], | ||
fileListRegex ? false, | ||
debug ? false, | ||
hash ? lib.fakeHash, |
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.
hash ? lib.fakeHash, | |
outputHash, | |
outputHashAlgo, |
fileList ? [ ], | ||
fileListRegex ? false, | ||
debug ? false, | ||
hash ? lib.fakeHash, |
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.
See the new comment. We can take advantage of the newly added lib.fetchers.withNormalizedHash
to handle all of this logic for us (including the ""
case)
|
||
env.SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt"; | ||
|
||
outputHash = hash; |
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.
outputHash = hash; | |
inherit outputHash outputHashAlgo; |
{ | ||
nativeBuildInputs = [ depotdownloader ]; | ||
|
||
env.SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt"; |
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.
env.SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt"; | |
env = { | |
DEPOT_DOWNLOADER_ARGS = toString ( | |
[ | |
"-app" | |
(toString app) | |
"-depot" | |
(toString depot) | |
"-manifest" | |
(toString manifest) | |
"-loginid" | |
# From DepotDownloader help: | |
# -loginid <#> - a unique 32-bit integer Steam LogonID in decimal, required if running multiple instances of DepotDownloader concurrently. | |
# We are running multiple instances of DepotDownloader concurrently, so this is required. | |
# Setting this to the manifest mod 2^32 will almost always result in a deterministic unique value. | |
# Nix doesn't have a builtin for mod, so we have to do it manually. | |
(toString (manifest - (manifest / 4294967295) * 4294967295) | |
] | |
++ lib.optionals (branch != null) [ "-beta" branch ] | |
++ lib.optionals (language != null) [ "-language" language ] | |
++ lib.optionals lowViolence [ "-lowviolence" ] | |
++ lib.optional (fileList != [ ]) ( | |
lib.optionalString fileListRegex "regex:" | |
+ writeText "steam-file-list-${name}.txt" (lib.concatLines fileList) | |
) | |
++ lib.optional debug "-debug" | |
); | |
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt"; | |
}; |
We can clean up the conditional flag logic a bit by using a proper Nix structure
stdenvNoCC.mkDerivation
could also be used here to make this more overridable -- similar to other fetchers
hash = "sha256-aW4OsQi3N5yAMdbTd8rxbb2qYMfFJBR4WQFIXvxpiMw="; | ||
}; | ||
|
||
build-system = [ setuptools ]; |
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.
build-system = [ setuptools ]; | |
nativeBuildInputs = [ | |
setuptoolsBuildHook | |
pypaInstallHook | |
]; |
dependencies = [ gevent ]; | ||
nativeCheckInputs = [ | ||
coverage | ||
pytestCheckHook |
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.
pytestCheckHook | |
pytestCheckHook | |
pytest-cov-stub | |
coveralls |
From dev_requirements.txt
buildPythonPackage rec { | ||
pname = "steam"; | ||
version = "1.4.4"; | ||
pyproject = true; |
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.
pyproject = true; | |
pyproject = false; |
./whydoesthisneedfixing.patch | ||
]; | ||
|
||
build-system = [ setuptools ]; |
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.
build-system = [ setuptools ]; | |
nativeBuildInputs = [ | |
setuptoolsBuildHook | |
pypaInstallHook | |
]; |
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.
This should get a release note as well probably
From https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/python.section.md:
What's the rationale for |
With #359705 merged I'll start to address some of these review comments. For the time being, though, I will be keeping |
I find it to be more technically correct and less likely to break in the future ...but the documentation is sorta vague with it saying "you can use |
If you don't mind, then I'll keep it pyproject = true. |
Description of changes
I have been given permission to package SteamVR by a Valve employee.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.