depot/third_party/nixpkgs/pkgs/tools/games/minecraft/fabric-installer/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

37 lines
982 B
Nix

{ lib
, stdenv
, fetchurl
, makeWrapper
, jre }:
stdenv.mkDerivation rec {
pname = "fabric-installer";
version = "1.0.1";
src = fetchurl {
url = "https://maven.fabricmc.net/net/fabricmc/fabric-installer/${version}/fabric-installer-${version}.jar";
sha256 = "sha256-Yu3xcL3MQe3qhdM6zz64VHQlhpmz1B+UGNKGyDbLCI0=";
};
dontUnpack = true;
nativeBuildInputs = [ jre makeWrapper ];
installPhase = ''
mkdir -p $out/{bin,lib/fabric}
cp $src $out/lib/fabric/fabric-installer.jar
makeWrapper ${jre}/bin/java $out/bin/fabric-installer \
--add-flags "-jar $out/lib/fabric/fabric-installer.jar"
'';
meta = with lib; {
homepage = "https://fabricmc.net/";
description = "Lightweight, experimental modding toolchain for Minecraft";
mainProgram = "fabric-installer";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.asl20;
maintainers = [ maintainers.ivar ];
platforms = platforms.unix;
};
}