forked from mirrors/nixpkgs
minecraft-server: version 1.7.5
Signed-off-by: Austin Seipp <aseipp@pobox.com>
This commit is contained in:
parent
c23464672e
commit
d60af7f34d
35
pkgs/games/minecraft-server/default.nix
Normal file
35
pkgs/games/minecraft-server/default.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{ stdenv, fetchurl, jre }:
|
||||
|
||||
with import <nixpkgs> {};
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "minecraft-server-${version}";
|
||||
version = "1.7.5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://s3.amazonaws.com/Minecraft.Download/versions/${version}/minecraft_server.${version}.jar";
|
||||
sha256 = "0f3sh3fws02yl4xqa8qrvn0cchfp0hymqrf30c5syzzcz9w4l8pq";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/lib/minecraft
|
||||
cp -v $src $out/lib/minecraft/server.jar
|
||||
|
||||
cat > $out/bin/minecraft-server << EOF
|
||||
#!/bin/sh
|
||||
exec ${jre}/bin/java \$@ -jar $out/lib/minecraft/server.jar nogui
|
||||
EOF
|
||||
|
||||
chmod +x $out/bin/minecraft-server
|
||||
'';
|
||||
|
||||
phases = "installPhase";
|
||||
|
||||
meta = {
|
||||
description = "Minecraft Server";
|
||||
homepage = "https://minecraft.net";
|
||||
license = stdenv.lib.licenses.unfreeRedistributable;
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
|
||||
};
|
||||
}
|
|
@ -1394,6 +1394,8 @@ let
|
|||
|
||||
minecraft = callPackage ../games/minecraft { };
|
||||
|
||||
minecraft-server = callPackage ../games/minecraft-server { };
|
||||
|
||||
minetest = callPackage ../games/minetest {
|
||||
libpng = libpng12;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue