-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add antichamber, an humble (indie!) bundle game #14
Conversation
On my machine it builds, but doesn’t run:
|
@Profpatsch I got the same error. This is not an error actually. This means that the application failed before printing its last error (killed with non-emtpy error buffers). I solved it by enabling |
It’s enabled here, doesn’t work. Update: Ah, it starts with a black screen, after a while that screen closes but the music starts. So the game is running, but no image. |
chmod 755 $out/bin/antichamber | ||
''; | ||
|
||
meta.platforms = lib.platforms.linux32; |
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.
So the package only works on i686-linux
but doesn't work on x86_64-linux
?
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's indeed a mistake.
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.
Could you please drop this then?
|
||
# Unpack binaries and data into $dest | ||
mkdir -p "$dest" | ||
${unzip}/bin/unzip $src "data/*" -d $dest && [ $? -le 2 ] |
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 about unpackCmd = "${unzip}/bin/unzip -d \"$name\" \"$curSrc\" 'data/*'";
instead of throwing everything into 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.
Even better: just unzip
the data folder, so no -d
is needed.
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's an habit I started with archlinux & AUR. I want to unzip in $dest because it is in the nix store partition, while $CWD will be on a temporary partition. For big binary/data archives, this is faster because it remains on the same partition, and mv operations are mostly immediate.
This could however go in the unpackPhase, but the generic build script requires the unpack phase to unpack into the temporary directory used for the build.
It is truly an install phase, unpack is only needed for sources before compilation. There is no such thing here.
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.
Okay, fair enough, for very large files this would take ages.
cat > $out/bin/antichamber <<EOF | ||
#!${stdenv_32bit.shell} | ||
cd $dest/Binaries/Linux/ | ||
exec ./UDKGame-Linux "$@" |
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.
Where does this game place its save files or similar state? I've found that most games are trying to use the current directory as the base directory. In this case it's a store path, which will be read-only on NixOS.
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 uses $HOME, probably via XDG. Setting $CWD is recquired for the game to find data files with a relative path.
# Unpack binaries and data into $dest | ||
mkdir -p "$dest" | ||
${unzip}/bin/unzip $src "data/*" -d $dest && [ $? -le 2 ] | ||
mv $dest/data/*/* $dest |
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'd assume here that data/*
is just a single directory, right? If yes, see the above comment about unzip
, which in this case would make even more sense to pass that subdirectory to unzip
.
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.
No, it's directories + files, but I only want the directories (no readme and installer stuffs)
Apparently this was merged as-is in 1fcecd0 by @Profpatsch (with wrong attribution to @aszlig). Forget all the comments here then. @Profpatsch If you still have issues with this game, you should definitely try to start it on its own Xephyr instance. This is often sufficient for me to access the menu and disable fullscreen. Then I can start is normally. I used to think it was related to i3. Wath is your window manager ? |
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.
Okay, was going to merge this, but I found a few issues left. Can you please address them? Thanks in advance :-)
chmod 755 $out/bin/antichamber | ||
''; | ||
|
||
meta.platforms = lib.platforms.linux32; |
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.
Could you please drop this then?
@@ -0,0 +1,58 @@ | |||
{ stdenv, stdenv_32bit, lib, pkgsi686Linux, fetchHumbleBundle, unzip}: | |||
|
|||
stdenv_32bit.mkDerivation rec { |
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.
Why are you using stdenv_32bit
here? You're already using callPackage_i686
which already passes pkgsi686Linux
function arguments. Thus stdenv_32bit
is equal to stdenv
(if no callPackage_i686
was used, it would use multilib).
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 is the correct way to handle this then ? What is the purpose of "callPackage_i686" ?
Is multilib not what we want on 64bit arch ?
libpulseaudio | ||
libvorbis | ||
libogg | ||
mesa |
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.
Please add these dependencies to the package function arguments explicitly.
@aszlig Updated, thanks :-) |
Pull request is from @layus and I haven't tested the game, because I don't own it myself, but apparently @Profpatsch seems to got it working to the point of having a black screen, but that could be a rendering issue. So I'm merging this anyway, because even if only one person (@layus) is going to play it, it won't hurt and if multiple people using the expressions we probably get bug reports :-)
This game uses 32bit libs.
Nixos users, do not forget to enable hardware.opengl.driSupport32Bit