mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
hosts/minecraft: init
This commit is contained in:
parent
dadadeed31
commit
779b3e7cb6
7 changed files with 260 additions and 3 deletions
32
packages/fabric/package.nix
Normal file
32
packages/fabric/package.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
fetchurl,
|
||||
makeBinaryWrapper,
|
||||
jre,
|
||||
}:
|
||||
stdenvNoCC.mkDerivation {
|
||||
name = "fabric";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://meta.fabricmc.net/v2/versions/loader/1.20.1/0.16.2/1.0.1/server/jar";
|
||||
hash = "sha256-1Qk7qDdC70lkeduCyzhPcKfoSrcCmTbVD1Yi9lEDjEk=";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -D $src $out/share/papermc/papermc.jar
|
||||
|
||||
makeWrapper ${lib.getExe jre} "$out/bin/fabric" \
|
||||
--append-flags "-jar $out/share/papermc/papermc.jar nogui"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ makeBinaryWrapper ];
|
||||
|
||||
meta.mainProgram = "fabric";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue