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

{ecwolf,lzwolf}: fix build with gcc-14, cleanup #368178

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

xokdvium
Copy link
Contributor

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/)
  • 25.05 Release Notes (or backporting 24.11 and 25.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.

Copy link
Contributor

@Jayman2000 Jayman2000 left a comment

Choose a reason for hiding this comment

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

This PR mostly looks good to me. I tried building ecwolf without the changes in this PR, and it failed. The changes in this commit fix that failure which is good. (I didn’t test lzwolf, though).

I only really have two critiques:

  • “ecwolf: use finalAttrs” does more than just switch to using finalAttrs. It also switches from using rev = <tag-name>; to rev = "refs/tags/<tag-name>;.

  • CONTRIBUTING.md says:

    In addition to writing properly formatted commit messages, it's important to include relevant information so other developers can later understand why a change was made. While this information usually can be found by digging code, mailing list/Discourse archives, pull request discussions or upstream changes, it may require a lot of work.

    I think that the “fix build with gcc-14” commits are self-explanitory, and I think that the commit message for “ecwolf: don't use pname in fetchFromBitbucket” does a good job at explaining why the change was made. I think that the other commits should have longer commit messages that explain why the changes were made.

I created a branch named dev/fix-ecwolf-suggestions. In that branch, I split “ecwolf: use finalAttrs” into two separate commits, and expanded the commit messages that I felt were lacking. If you agree with my changes, then you can push the dev/fix-ecwolf-suggestions branch to your PR branch.

@xokdvium xokdvium marked this pull request as draft December 26, 2024 16:34
xokdvium and others added 7 commits December 26, 2024 19:35
Before this change, the ecwolf package used a recursive attribute set.
In general, it’s recommended that you avoid using recursive attribute
sets [1]. This change makes it so that the ecwolf package uses
finalAttrs instead of a recursive attribute set. As an added bonus, this
also means that ecwolf.src.rev will automatically get updated if someone
calls ecwolf.overrideAttrs and overrides ecwolf.version.

[1]: <https://nix.dev/guides/best-practices.html#recursive-attribute-set-rec>

Co-authored-by: Jason Yundt <[email protected]>
Before this change, ecwolf.src.rev was set to the name of a tag. This is
generally not recommended. It’s better to set rev to
"refs/tags/<tag-name>" [1].

[1]: <https://nixos.org/manual/nixpkgs/stable/#fetchgit>
It looks like sha256 will eventually be deprecated in favor of hash:
<NixOS#325892>.
It looks like sha256 will eventually be deprecated in favor of hash:
<NixOS#325892>.
@xokdvium xokdvium marked this pull request as ready for review December 26, 2024 16:36
@xokdvium
Copy link
Contributor Author

Rebased and cherry-picked commits with the improved descriptions. Thanks for taking the time to fix them up!

Copy link
Contributor

@Jayman2000 Jayman2000 left a comment

Choose a reason for hiding this comment

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

Looks good to me. ecwolf works fine. I haven’t tested lzwolf.

@xokdvium
Copy link
Contributor Author

I've checked that lzwolf launches on x86_64-linux:

image

Though in the long run I think we should consider dropping lzwolf, as it seems abandoned: https://beta.wolf3d.net/engines/LZWolf.

Unfortunately, LZWolf's development has been discontinued as of the 5th of March, 2023. The engine is still a fantastic source port for the building of mods, with a lot of cool features to take advantage of, but will not be following ECWolf to a 1.4 release.

Now it's pretty easy to get it working, but further breakages will be harder to fix and continuing to carry downstream patches is always a burden.

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 368178


x86_64-linux

✅ 2 packages built:
  • ecwolf
  • lzwolf

@ofborg ofborg bot requested a review from Jayman2000 December 26, 2024 20:09
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.

2 participants