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

Xjump: init at 2.9.3 #34706

Merged
merged 4 commits into from Feb 20, 2018
Merged

Xjump: init at 2.9.3 #34706

merged 4 commits into from Feb 20, 2018

Conversation

P-E-Meunier
Copy link
Contributor

@P-E-Meunier P-E-Meunier commented Feb 7, 2018

Motivation for this change

I had too much time in my life, so I decided to waste it playing this classic addictive game.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Copy link
Member

@dtzWill dtzWill left a comment

Choose a reason for hiding this comment

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

Seems to work, but few minor issues as described.

@@ -0,0 +1,27 @@
{ stdenv, fetchFromGitHub, gcc, autoconf, automake, xorg, ... }:
Copy link
Member

Choose a reason for hiding this comment

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

I don't know that it's problematic, but the "..." is certainly not idiomatic unless needed or extra arguments expected.

Please remove or explain :).

Copy link
Member

@7c6f434c 7c6f434c Feb 7, 2018

Choose a reason for hiding this comment

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

Also, callPackage automatically searches xorg, so it might be better to have libX11, libXt, libXpm and libXaw as expression arguments.

rev = "e7f20fb8c2c456bed70abb046c1a966462192b80";
sha256 = "0hq4739cvi5a47pxdc0wwkj2lmlqbf1xigq0v85qs5bq3ixmq2f7";
};
buildInputs = [ gcc autoconf automake xorg.libX11 xorg.libXt xorg.libXpm xorg.libXaw ];
Copy link
Member

Choose a reason for hiding this comment

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

autoconf & automake should be nativeBuildInputs.

Consider replacing these (and the preConfigure attribute) with autoreconfHook (I haven't tested if this works).

Copy link
Member

Choose a reason for hiding this comment

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

Oh--and why is "gcc" a buildInput? It almost never should be, especially in code that isn't itself a compiler or runtime of some sort.

description = "The falling tower game";
maintainers = with maintainers; [ pmeunier ];
platforms = platforms.linux;
};
Copy link
Member

Choose a reason for hiding this comment

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

Is it known to not work on other platforms? Just curious, might be worth letting builders find out. Deps on basic Xlibs suggest it might.

More importantly, please add the license which appears to be GPL2: https://github.com/hugomg/xjump/blob/e7f20fb8c2c456bed70abb046c1a966462192b80/COPYING

preConfigure = ''
autoreconf --install
'';
installPhase = ''
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't look like a custom installPhase is needed, please remove.

Using default installation behavior also installs a manpage, icon, and .desktop file, which are all nice to include.

It also installs a "var/xjump/highscores" file which may be problematic, possibly needing to be removed in a postInstall or something-- although probably should check to ensure either way that it doesn't attempt to read/write that location regardless.

Copy link
Member

Choose a reason for hiding this comment

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

Up to you if you want to fix the highscores situation, I think ignoring it for now is fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the review! I just fixed my mistakes (at least I hope), including the highscores, which are now configurable. I don't know what is the best way to install a system-wide highscores file, the behaviour now is to default to /var/xjump, and let the user create that directory and give it the appropriate permissions.

@7c6f434c
Copy link
Member

@GrahamcOfBorg build xjump

@7c6f434c
Copy link
Member

License?

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Partial log (click to expand)

fi # Make sure the highscore file has non-zero length to make rpmlint happy...
mkdir: cannot create directory '/var': Permission denied
/nix/store/yq03c2ny43mc24j7dq5riznzb09ddhpq-bash-4.4-p12/bin/bash: line 2: /var/xjump/highscores: No such file or directory
make[2]: *** [Makefile:1010: install-exec-hook] Error 1
make[2]: Leaving directory '/build/source'
make[1]: *** [Makefile:936: install-exec-am] Error 2
make[1]: Leaving directory '/build/source'
make: *** [Makefile:881: install-am] Error 2
builder for '/nix/store/h55j8jh7riqcsiaadp9kadfkayb23iy2-xjump-2.9.3.drv' failed with exit code 2
error: build of '/nix/store/h55j8jh7riqcsiaadp9kadfkayb23iy2-xjump-2.9.3.drv' failed

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

      _main in main.o
  "_setresuid", referenced from:
      _main in main.o
ld: symbol(s) not found for architecture x86_64
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [Makefile:469: xjump] Error 1
make[1]: Leaving directory '/private/tmp/nix-build-xjump-2.9.3.drv-0/source'
make: *** [Makefile:372: all] Error 2
builder for '/nix/store/wi2s7ji9rj0n5i6133xl7mka5977frb7-xjump-2.9.3.drv' failed with exit code 2
error: build of '/nix/store/wi2s7ji9rj0n5i6133xl7mka5977frb7-xjump-2.9.3.drv' failed

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Partial log (click to expand)

fi # Make sure the highscore file has non-zero length to make rpmlint happy...
mkdir: cannot create directory '/var': Permission denied
/nix/store/7fxbh1yhagvwbdrmdyyy5ghcjhwjndhs-bash-4.4-p12/bin/bash: line 2: /var/xjump/highscores: No such file or directory
make[2]: *** [Makefile:1010: install-exec-hook] Error 1
make[2]: Leaving directory '/build/source'
make[1]: *** [Makefile:936: install-exec-am] Error 2
make[1]: Leaving directory '/build/source'
make: *** [Makefile:881: install-am] Error 2
builder for '/nix/store/kn2qqi2ysqj0vj8sk2hacw51lvj04hz5-xjump-2.9.3.drv' failed with exit code 2
error: build of '/nix/store/kn2qqi2ysqj0vj8sk2hacw51lvj04hz5-xjump-2.9.3.drv' failed

@7c6f434c
Copy link
Member

The failures are because installation tries to create the score directory.

@7c6f434c
Copy link
Member

@GrahamcOfBorg build xjump

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Partial log (click to expand)

fi # Make sure the highscore file has non-zero length to make rpmlint happy...
mkdir: cannot create directory '/var': Permission denied
/nix/store/yq03c2ny43mc24j7dq5riznzb09ddhpq-bash-4.4-p12/bin/bash: line 2: /var/xjump/highscores: No such file or directory
make[2]: *** [Makefile:1010: install-exec-hook] Error 1
make[2]: Leaving directory '/build/source'
make[1]: *** [Makefile:936: install-exec-am] Error 2
make[1]: Leaving directory '/build/source'
make: *** [Makefile:881: install-am] Error 2
builder for '/nix/store/h55j8jh7riqcsiaadp9kadfkayb23iy2-xjump-2.9.3.drv' failed with exit code 2
error: build of '/nix/store/h55j8jh7riqcsiaadp9kadfkayb23iy2-xjump-2.9.3.drv' failed

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Partial log (click to expand)

fi # Make sure the highscore file has non-zero length to make rpmlint happy...
mkdir: cannot create directory '/var': Permission denied
/nix/store/7fxbh1yhagvwbdrmdyyy5ghcjhwjndhs-bash-4.4-p12/bin/bash: line 2: /var/xjump/highscores: No such file or directory
make[2]: *** [Makefile:1010: install-exec-hook] Error 1
make[2]: Leaving directory '/build/source'
make[1]: *** [Makefile:936: install-exec-am] Error 2
make[1]: Leaving directory '/build/source'
make: *** [Makefile:881: install-am] Error 2
builder for '/nix/store/kn2qqi2ysqj0vj8sk2hacw51lvj04hz5-xjump-2.9.3.drv' failed with exit code 2
error: build of '/nix/store/kn2qqi2ysqj0vj8sk2hacw51lvj04hz5-xjump-2.9.3.drv' failed

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

      _main in main.o
  "_setresuid", referenced from:
      _main in main.o
ld: symbol(s) not found for architecture x86_64
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [Makefile:469: xjump] Error 1
make[1]: Leaving directory '/private/tmp/nix-build-xjump-2.9.3.drv-0/source'
make: *** [Makefile:372: all] Error 2
builder for '/nix/store/wi2s7ji9rj0n5i6133xl7mka5977frb7-xjump-2.9.3.drv' failed with exit code 2
error: build of '/nix/store/wi2s7ji9rj0n5i6133xl7mka5977frb7-xjump-2.9.3.drv' failed

@7c6f434c
Copy link
Member

It looks like macOS failure is not because of the scorefile, so it's OK to also set meta.platforms to just Linux.

@P-E-Meunier
Copy link
Contributor Author

@GrahamcOfBorg build xjump

1 similar comment
@7c6f434c
Copy link
Member

@GrahamcOfBorg build xjump

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Partial log (click to expand)

�[31;1merror:�[0m while evaluating 'callPackageWith' at �[1m/var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/lib/customisation.nix�[0m:113:35, called from �[1m/var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/pkgs/top-level/all-packages.nix�[0m:19040:11:
while evaluating 'makeOverridable' at �[1m/var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/lib/customisation.nix�[0m:72:24, called from �[1m/var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/lib/customisation.nix�[0m:117:8:
undefined variable 'buildPlatform' at �[1m/var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/pkgs/games/xjump/default.nix�[0m:15:16

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

error: while evaluating 'callPackageWith' at /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/lib/customisation.nix:113:35, called from /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/top-level/all-packages.nix:19040:11:
while evaluating 'makeOverridable' at /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/lib/customisation.nix:72:24, called from /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/lib/customisation.nix:117:8:
undefined variable 'buildPlatform' at /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/games/xjump/default.nix:15:16

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Partial log (click to expand)

error: while evaluating ‘callPackageWith’ at /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/ogden/lib/customisation.nix:113:35, called from /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/ogden/pkgs/top-level/all-packages.nix:19040:11:
while evaluating ‘makeOverridable’ at /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/ogden/lib/customisation.nix:72:24, called from /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/ogden/lib/customisation.nix:117:8:
undefined variable ‘buildPlatform’ at /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/ogden/pkgs/games/xjump/default.nix:15:16

@P-E-Meunier
Copy link
Contributor Author

Ok, the failure is my mistake, can we rebuild?

@7c6f434c
Copy link
Member

@GrahamcOfBorg build xjump

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

make[1]: Leaving directory '/build/source'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/2p1dl2q8gcwzrxwkqhqxd5fwgp9bvrci-xjump-2.9.3
shrinking /nix/store/2p1dl2q8gcwzrxwkqhqxd5fwgp9bvrci-xjump-2.9.3/bin/xjump
gzipping man pages under /nix/store/2p1dl2q8gcwzrxwkqhqxd5fwgp9bvrci-xjump-2.9.3/share/man/
strip is /nix/store/adidfx4pa7vmvby0gjqqmiwg2x49yr27-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/2p1dl2q8gcwzrxwkqhqxd5fwgp9bvrci-xjump-2.9.3/bin
patching script interpreter paths in /nix/store/2p1dl2q8gcwzrxwkqhqxd5fwgp9bvrci-xjump-2.9.3
checking for references to /build in /nix/store/2p1dl2q8gcwzrxwkqhqxd5fwgp9bvrci-xjump-2.9.3...
/nix/store/2p1dl2q8gcwzrxwkqhqxd5fwgp9bvrci-xjump-2.9.3

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

make[1]: Leaving directory '/build/source'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/313ij8xd15rm04fccaz8xagzbyz087px-xjump-2.9.3
shrinking /nix/store/313ij8xd15rm04fccaz8xagzbyz087px-xjump-2.9.3/bin/xjump
gzipping man pages under /nix/store/313ij8xd15rm04fccaz8xagzbyz087px-xjump-2.9.3/share/man/
strip is /nix/store/skd6ix5ipkyhxzq7naylj4digawakl4j-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/313ij8xd15rm04fccaz8xagzbyz087px-xjump-2.9.3/bin
patching script interpreter paths in /nix/store/313ij8xd15rm04fccaz8xagzbyz087px-xjump-2.9.3
checking for references to /build in /nix/store/313ij8xd15rm04fccaz8xagzbyz087px-xjump-2.9.3...
/nix/store/313ij8xd15rm04fccaz8xagzbyz087px-xjump-2.9.3

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Partial log (click to expand)

 /nix/store/5wxjmr5ahlnk2ljkhv5fia1w46qv8ajp-coreutils-8.29/bin/install -c -m 644 themes/default.xpm themes/ion.xpm themes/jumpnbump.xpm '/nix/store/9l2jdsq9llwd39di3br1852ldy0kn8k9-xjump-2.9.3/share/xjump/themes'
 /nix/store/5wxjmr5ahlnk2ljkhv5fia1w46qv8ajp-coreutils-8.29/bin/mkdir -p '/nix/store/9l2jdsq9llwd39di3br1852ldy0kn8k9-xjump-2.9.3/share/man/man6'
 /nix/store/5wxjmr5ahlnk2ljkhv5fia1w46qv8ajp-coreutils-8.29/bin/install -c -m 644 xjump.6 '/nix/store/9l2jdsq9llwd39di3br1852ldy0kn8k9-xjump-2.9.3/share/man/man6'
make[1]: Leaving directory '/private/tmp/nix-build-xjump-2.9.3.drv-0/source'
post-installation fixup
gzipping man pages under /nix/store/9l2jdsq9llwd39di3br1852ldy0kn8k9-xjump-2.9.3/share/man/
strip is /nix/store/v8ifq0hapblpr2z0hx4wvwg02w4aczqy-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/9l2jdsq9llwd39di3br1852ldy0kn8k9-xjump-2.9.3/bin
patching script interpreter paths in /nix/store/9l2jdsq9llwd39di3br1852ldy0kn8k9-xjump-2.9.3
/nix/store/9l2jdsq9llwd39di3br1852ldy0kn8k9-xjump-2.9.3

@7c6f434c 7c6f434c merged commit e46553b into NixOS:master Feb 20, 2018
@dtzWill
Copy link
Member

dtzWill commented Feb 20, 2018

Yay!

@P-E-Meunier P-E-Meunier deleted the xjump branch February 20, 2018 13:39
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.

None yet

4 participants