Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
57 lines
1.3 KiB
Nix
57 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 = "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 = [ ];
|
|
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"
|
|
''
|