Skip to content

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

Merged
wegank merged 7 commits into
NixOS:masterfrom
xokdvium:dev/fix-ecwolf
Jan 1, 2025
Merged

wegank merged 7 commits into
NixOS:masterfrom
xokdvium:dev/fix-ecwolf

Conversation

@xokdvium

Copy link
Copy Markdown
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.

@github-actions github-actions Bot added 6.topic: games Gaming on NixOS 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Dec 25, 2024
@ofborg ofborg Bot added the 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. label Dec 25, 2024

@Jayman2000 Jayman2000 left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor Author

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

@github-actions github-actions Bot removed the 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. label Dec 26, 2024

@Jayman2000 Jayman2000 left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
@ofborg ofborg Bot added the 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. label Dec 26, 2024
@keenanweaver

Copy link
Copy Markdown
Member

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 368178


x86_64-linux

✅ 2 packages built:
  • ecwolf
  • lzwolf

@keenanweaver keenanweaver left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@wegank wegank added 12.approvals: 2 This PR was reviewed and approved by two persons. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Dec 29, 2024
@wegank
wegank merged commit 87b8cc6 into NixOS:master Jan 1, 2025
@xokdvium
xokdvium deleted the dev/fix-ecwolf branch January 1, 2025 23:30
@Sigmanificient Sigmanificient mentioned this pull request Mar 8, 2025
27 of 28 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: games Gaming on NixOS 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 2 This PR was reviewed and approved by two persons. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants