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
etlegacy: fix and refactor #250249
etlegacy: fix and refactor #250249
Conversation
ee17a8a
to
09ef2e0
Compare
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
It's not removing it though, just refactoring. |
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 @drupol
thanks for your suggested changes. Many of them look okay, and adding the dedicated server is a good move, but I'd like to discuss a few of them. See comments in the review.
Also, I'm keen to hear your thoughts on how we support for other platforms than Linux x86_64
. Especially Linux i686
and Darwin.
# This indicates the build was by a CI pipeline and prevents the resource | ||
# files from being flagged as 'dirty' due to potentially being custom built. | ||
export CI="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.
I understand the motivation to optimise, but I would prefer to retain the preBuild
script as it was requested we add those variables by one of the ETLegacy developers who reviewed an earlier build.
Without CI=true
the game client shows the version as 2.81-dirty
instead of 2.81.1
which may cause confusion. Compare with other packages, including Flatpak, where the version shows correctly.
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.
Fair enough, going to revert my change.
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.
Thanks for that. Previously I think there was a suggestion we could talk to upstream about getting an upstream change to make this unnecessary. I guess it's there to make it clear to people who compile themselves and might have modified things that they're running a version that could potentially be unstable when playing online.
pkgs/games/etlegacy/default.nix
Outdated
makeWrapper $out/lib/etlegacy/etl.* $out/bin/etl | ||
makeWrapper $out/lib/etlegacy/etlded.* $out/bin/etlded | ||
|
||
rm -rf $out/share/applications/com.etlegacy.ETLegacy.x86_64.desktop |
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.
As an ET fan, you're probably aware that most ET mods don't run on the 64-bit version. Ergo, many people, including myself, want to run the 32-bit version. The change to postInstall
would result in duplicate desktop files for anybody running versions other than the x86_64
version.
Also, just rm
(without -rf
would be enough here, since we're just removing a single file). :)
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.
You're right, I've skipped the x86_64
in the filename, going to make an adjustment.
mainProgram = | ||
if stdenv.hostPlatform.system == "i686-linux" | ||
then "etl.i386" | ||
else "etl.x86_64"; |
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 liked that the above enabled me to have both 64-bit and 32-bit (via pkgsi686Linux
) versions installed without a collision on the executable - I can execute either executable to launch that version (and also can choose either .desktop
file). I admit that's probably not a particularly strong need though and of course an override could restore distinct executable names if versions for multiple architectures were installed.
However, it also meant we could just use upstream's .desktop
file instead of deleting theirs and taking responsibility for a new one as part of this build.
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.
Fair enough, going to leave the .<arch>
in the next iteration and use their desktop file.
if [ "$1" = "describe" ]; then | ||
echo "${version}" | ||
fi | ||
''; |
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.
The fakeGit
seemed to be necessary to build previously, as the build process runs git describe
.
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.
Going to restore this as well.
Thanks for the detailed review, I'm going to start working on them in one hour. |
09ef2e0
to
3e9ea89
Compare
3e9ea89
to
3a8254f
Compare
3a8254f
to
2836fd6
Compare
Youhou ! thanks ! |
Hello,
I'm unable to run
etlegacy
on my machine, I get the following error log:This PR:
etl
andetlded
binariesfortify
to have fully working binaries and fix the aforementioned issuerunCommand
argumentfetchAsset
functioncmakeFlags
and change default install directoriesPing @ashleyghooper
Description of changes
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/
)