tiny-remapper: init

This commit is contained in:
Luke Granger-Brown 2021-01-04 20:48:20 +00:00
parent 87e7dae108
commit 2d52be000f
2 changed files with 28 additions and 0 deletions

View file

@ -18,5 +18,6 @@
envoy = import ./envoy args; envoy = import ./envoy args;
deluge = import ./deluge args; deluge = import ./deluge args;
grafana-plugins = import ./grafana-plugins args; grafana-plugins = import ./grafana-plugins args;
tiny-remapper = import ./tiny-remapper.nix args;
} // (import ./heptapod-runner.nix args) } // (import ./heptapod-runner.nix args)
// (import ./lightspeed args) // (import ./lightspeed args)

View file

@ -0,0 +1,27 @@
{ depot, pkgs, ... }:
let
inherit (pkgs) stdenvNoCC fetchurl makeWrapper;
java = pkgs.jdk;
in
stdenvNoCC.mkDerivation rec {
pname = "tiny-remapper";
version = "0.3.2";
src = fetchurl {
url = "https://maven.fabricmc.net/net/fabricmc/tiny-remapper/${version}/tiny-remapper-${version}-fat.jar";
sha256 = "d8301fbe684d10849003dc92d18f24ec53cf755c3a6fdfe371d581cb30bd47e1";
};
dontBuild = true;
dontUnpack = true;
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out/lib $out/bin
cp $src $out/lib/tiny-remapper-${version}-fat.jar
makeWrapper ${java}/bin/java $out/bin/tiny-remapper \
--set JAVA_HOME ${java} \
--add-flags "-jar $out/lib/tiny-remapper-${version}-fat.jar"
'';
}