forked from mirrors/nixpkgs
minecraft-server: 1.14 -> 1.14.3
Also removes older versions.
This commit is contained in:
parent
20b993ef2c
commit
5d04dcf4f5
|
@ -1,57 +1,34 @@
|
||||||
{ stdenv, fetchurl, jre }:
|
{ stdenv, fetchurl, jre }:
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "minecraft-server-${version}";
|
||||||
|
version = "1.14.3";
|
||||||
|
|
||||||
let
|
src = fetchurl {
|
||||||
common = { version, sha256, url }:
|
url = "https://launcher.mojang.com/v1/objects/d0d0fe2b1dc6ab4c65554cb734270872b72dadd6/server.jar";
|
||||||
stdenv.mkDerivation (rec {
|
sha256 = "0f0v0kqz2v5758551yji1vj6xf43lvbma30v3crz4h7cpzq5c8ll";
|
||||||
name = "minecraft-server-${version}";
|
|
||||||
inherit version;
|
|
||||||
|
|
||||||
src = fetchurl {
|
|
||||||
inherit url sha256;
|
|
||||||
};
|
|
||||||
|
|
||||||
preferLocalBuild = true;
|
|
||||||
|
|
||||||
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 = with stdenv.lib.maintainers; [ thoughtpolice tomberek costrouc];
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
in {
|
|
||||||
minecraft-server_1_14 = common {
|
|
||||||
version = "1.14";
|
|
||||||
url = "https://launcher.mojang.com/v1/objects/f1a0073671057f01aa843443fef34330281333ce/server.jar";
|
|
||||||
sha256 = "671e3d334dd601c520bf1aeb96e49038145172bef16bc6c418e969fd8bf8ff6c";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
minecraft-server_1_13_2 = common {
|
preferLocalBuild = true;
|
||||||
version = "1.13.2";
|
|
||||||
url = "https://launcher.mojang.com/v1/objects/3737db93722a9e39eeada7c27e7aca28b144ffa7/server.jar";
|
|
||||||
sha256 = "13h8dxrrgqa1g6sd7aaw26779hcsqsyjm7xm0sknifn54lnamlzz";
|
|
||||||
};
|
|
||||||
|
|
||||||
minecraft-server_1_12_2 = common {
|
installPhase = ''
|
||||||
version = "1.12.2";
|
mkdir -p $out/bin $out/lib/minecraft
|
||||||
url = "https://s3.amazonaws.com/Minecraft.Download/versions/1.12.2/minecraft_server.1.12.2.jar";
|
cp -v $src $out/lib/minecraft/server.jar
|
||||||
sha256 = "0zhnac6yvkdgdaag0gb0fgrkgizbwrpf7s76yqdiknfswrs947zy";
|
|
||||||
};
|
|
||||||
|
|
||||||
|
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 = with stdenv.lib.maintainers; [ thoughtpolice tomberek costrouc];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -21661,12 +21661,7 @@ in
|
||||||
|
|
||||||
minecraft = callPackage ../games/minecraft { };
|
minecraft = callPackage ../games/minecraft { };
|
||||||
|
|
||||||
minecraft-server = minecraft-server_1_14;
|
minecraft-server = callPackage ../games/minecraft-server { };
|
||||||
|
|
||||||
inherit (callPackages ../games/minecraft-server { })
|
|
||||||
minecraft-server_1_14
|
|
||||||
minecraft-server_1_13_2
|
|
||||||
minecraft-server_1_12_2;
|
|
||||||
|
|
||||||
moon-buggy = callPackage ../games/moon-buggy {};
|
moon-buggy = callPackage ../games/moon-buggy {};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue