mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 17:14:33 +00:00
6de2d274fb
optifinePackages.optifine-latest: 1.18.1_HD_U_H4 -> 1.19.2_HD_U_H9 optifinePackages.optifine_1_19_2: init at 1.19.2_HD_U_H9 optifinePackages.optifine_1_19_1: init at 1.19.1_HD_U_H9 optifinePackages.optifine_1_19: init at 1.19_HD_U_H9 optifinePackages.optifine_1_18_2: init at 1.18.2_HD_U_H7 optifinePackages.optifine_1_18_1: 1.18.1_HD_U_H4 -> 1.18.1_HD_U_H6 optifinePackages.optifine_1_18: init at 1.18_HD_U_H3 optifinePackages.optifine_1_16_4: init at 1.16.4_HD_U_G7 optifinePackages.optifine_1_16_3: init at 1.16.3_HD_U_G5 optifinePackages.optifine_1_16_2: init at 1.16.2_HD_U_G5 optifinePackages.optifine_1_16_1: init at 1.16.1_HD_U_G2 optifinePackages.optifine_1_15_2: 1.16.5_HD_U_G8 -> 1.15.2_HD_U_G6 optifinePackages.optifine_1_14_3: init at 1.14.3_HD_U_F2 optifinePackages.optifine_1_14_2: init at 1.14.2_HD_U_F1 optifinePackages.optifine_1_13_1: init at 1.13.1_HD_U_E4 optifinePackages.optifine_1_13: init at 1.13_HD_U_E4 optifinePackages.optifine_1_12_1: init at 1.12.1_HD_U_G5 optifinePackages.optifine_1_12: init at 1.12_HD_U_G5 optifinePackages.optifine_1_11: init at 1.11_HD_U_G5 optifinePackages.optifine_1_10_2: init at 1.10.2_HD_U_I5 optifinePackages.optifine_1_9_2: init at 1.9.2_HD_U_E3 optifinePackages.optifine_1_9_0: init at 1.9.0_HD_U_I5 optifinePackages.optifine_1_8_8: init at 1.8.8_HD_U_I7 optifinePackages.optifine_1_8_0: init at 1.8.0_HD_U_I7 optifinePackages.optifine_1_7_2: init at 1.7.2_HD_U_F7
51 lines
1.3 KiB
Nix
51 lines
1.3 KiB
Nix
{ version
|
|
, sha256
|
|
, lib
|
|
, runCommand
|
|
, fetchurl
|
|
, makeWrapper
|
|
, jre
|
|
}:
|
|
|
|
let
|
|
mcVersion = builtins.head (lib.splitString "_" version);
|
|
in
|
|
runCommand "optifine-${mcVersion}" {
|
|
pname = "optifine";
|
|
inherit version;
|
|
|
|
src = fetchurl {
|
|
url = "https://optifine.net/download?f=OptiFine_${version}.jar";
|
|
inherit sha256;
|
|
name = "OptiFine_${version}.jar";
|
|
};
|
|
|
|
nativeBuildInputs = [ jre makeWrapper ];
|
|
|
|
passthru.updateScript = {
|
|
command = [ ./update.py ];
|
|
supportedFeatures = [ "commit" ];
|
|
};
|
|
|
|
meta = with lib; {
|
|
homepage = "https://optifine.net/";
|
|
description = "A Minecraft ${mcVersion} optimization mod";
|
|
longDescription = ''
|
|
OptiFine is a Minecraft optimization mod.
|
|
It allows Minecraft to run faster and look better with full support for HD textures and many configuration options.
|
|
This is for version ${mcVersion} of Minecraft.
|
|
'';
|
|
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
|
license = licenses.unfree;
|
|
maintainers = [ maintainers.ivar ];
|
|
platforms = platforms.unix;
|
|
mainProgram = "optifine";
|
|
};
|
|
} ''
|
|
mkdir -p $out/{bin,lib/optifine}
|
|
cp $src $out/lib/optifine/optifine.jar
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/optifine \
|
|
--add-flags "-jar $out/lib/optifine/optifine.jar"
|
|
''
|