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
xu4: init at 1.3 #181866
base: master
Are you sure you want to change the base?
xu4: init at 1.3 #181866
Conversation
Are you still going to package v1.0 now that 1.1 is available? There are some fixes that users should have. |
It'd take me some time to adjust things to the changes in 1.1 and I've been using 1.0 with no issues for some time now... |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
Please note that this package is now three versions behind the latest xu4 1.3 release. Also, libxml2 is not required if the tlkconv utility is not being built. |
I just tried updating this. v1.1+ adds a dependency on https://github.com/WickedSmoke/faun which isn't currently available on nixpkgs so that would have to be packaged first. v1.2+ seems to get some git submodule during the build. This isn't allowed in Nix as it strictly separates the phase of getting sources from building things. @WickedSmoke can you shed some light into what this gets exactly, why it was necessary, maybe there's some way to work around it? Many thanks. |
The GLV submodule is a new backend which is the default on Linux that replaces Allegro. This code is included in the source tarball so I recommend you use that rather than Git. The dist/xu4.spec file for RPM has been updated and may be the best example of how your could package for your distribution. It's still possible to use Allegro for display & audio, but the official builds use GLV & Faun so that's what I would recommend. |
Faun also has an RPM dist/faun.spec file you can study. Also note that there are five new game & music modules that you could provide as a package (see https://xu4.sourceforge.net/download.php#release). |
@WickedSmoke I managed to get 1.1 to build with |
If the gui.png is missing from render.pak then you need to rebuild that file. Perhaps the 1.0 version already exists? Could you try building the 1.3 version first? I'd like to avoid spending time dealing with outdated ones. |
225de84
to
b2bdaad
Compare
pkgs/games/xu4/default.nix
Outdated
|
||
nativeBuildInputs = [ makeWrapper ]; | ||
|
||
# there's no `install` target |
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.
A make install target does exist. It installs the dist/xu4.desktop item though, which for some reason is ignored and remade below.
Also, why does the binary get copied as $out/share/xu4?
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.
A make install target does exist.
Ah I see it's been added in 1.1 👍 xu4-engine/u4@bb02ea4
However it includes u4upgrade.zip
and I haven't been able to find its license so I'm packaging that separately ( #185063 ).
It installs the dist/xu4.desktop item though, which for some reason is ignored and remade below.
Using your desktop file now as of 571e028 👍
Also, why does the binary get copied as $out/share/xu4?
This is so that bin
is clean and only contains a single binary (a small wrapper, it's pretty common in Nix) and not the modules and other files.
a0132b1
to
e48fa4e
Compare
@WickedSmoke Thanks for the reviews! Could you approve the PR to improve the chances of getting merged? |
I don't think libXxf86vm is required, so you should try to build without that. Once you've checked that I'll be happy to approve the PR. |
Done in 2dbdf0b , it works 👍 |
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.
From the game side of things this looks good. Seeing as Mauricio started the packaging process over a year ago I hope the PR is approved soon.
Note that version 1.4 is likely to be released within a month, so you should upgrade ASAP after that. I don't expect any changes for the packaging so a simple version bump should do the trick.
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-already-reviewed/2617/1187 |
]; | ||
|
||
configurePhase = '' | ||
patchShebangs . |
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 be done in postPatch or preConfigure to use the standard configurPhase
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.
Unfortunately the standard configurePhase won't work here because it runs ./configure --prefix=$out
which this nonstandard configure
doesn't like, it wants ./configure --prefix $out
(no equals) 🤷♂️
I'll add a comment about this.
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.
Do we just need to to patchShebang the configure script or anything else? It is always nice if we can avoid the . for all files.
|
||
postConfigure = '' | ||
# need to report this upstream | ||
sed --in-place 's/-Wall/-Wno-error=format-security/g' src/Makefile |
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.
Can we disable werror completely?
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 see Werror set anywhere in the repo 🤷♂️
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.
Hmm, that's strange
pkgs/games/xu4/default.nix
Outdated
nativeBuildInputs = [ makeWrapper ]; | ||
|
||
# The `install` target references some files with unknown license | ||
installPhase = |
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.
installPhase = | |
installPhase = '' |
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.
Applied in 467e54a
467e54a
to
9590333
Compare
eb6f8fc
to
3512c2e
Compare
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.
other than that one comment LGTM
]; | ||
|
||
configurePhase = '' | ||
patchShebangs . |
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.
Do we just need to to patchShebang the configure script or anything else? It is always nice if we can avoid the . for all files.
Description of changes
http://xu4.sourceforge.net/
XU4 is a remake of the computer game Ultima IV.
It requires the original game files, which are not open source and is available from GOG and some other sites. The zip file then needs to be placed in
~/.local/share/xu4
.I'll probably make another PR with a separate unfree package getting that and some graphics upgrade patches so users don't need to set things up manually.
cc @WickedSmoke
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/
)nixos/doc/manual/md-to-db.sh
to update generated release notes