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

minecraft-server: build against jre_headless #84075

Merged
merged 1 commit into from Apr 3, 2020

Conversation

Gaelan
Copy link
Contributor

@Gaelan Gaelan commented Apr 2, 2020

Motivation for this change

minecraft-server, as its name implies, is a server, and therefore isn't run with a GUI. Therefore, we can use jre_headless and avoid installing GTK.

(Actually, that's not quite true: the minecraft server does have an optional GUI, which is little more than a window with stdin/stdout and some CPU/memory stats. However, our wrapper script turns off the GUI with nogui anyway, so I don't think it matters.)

Tested by running the NixOS minecraft-server service and successfully connecting to the game.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

otherwise LGTM

pkgs/games/minecraft-server/default.nix Outdated Show resolved Hide resolved
pkgs/games/minecraft-server/default.nix Outdated Show resolved Hide resolved
pkgs/games/minecraft-server/default.nix Outdated Show resolved Hide resolved
pkgs/games/minecraft-server/default.nix Outdated Show resolved Hide resolved
@Gaelan
Copy link
Contributor Author

Gaelan commented Apr 2, 2020

Oh. Oops, I left nixfmt on. Might as well keep it, I guess.

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

the closure savings is nice:

/nix/store/yya43qh27hqdnciay5zp7kxdhr29zisw-minecraft-server-1.15.2	 424.9M
/nix/store/w4ssi04ankgz3ls49qcpg2qzp97xr8gz-minecraft-server-1.15.2	 168.9M

@infinisil infinisil merged commit 7f20da7 into NixOS:master Apr 3, 2020
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

5 participants