-
Download .nix file
-
Run:
$ nix run -f all-minecrafts.nix versions.v1_8_9.client -c minecraft
-
Enjoy (…power of fixed-output derivations)!
Internally, minecraft consists of four entities: client .jar, libraries, native libraries and assets. The list of required files is distributed through https://launchermeta.mojang.com/mc/game/version_manifest.json file.
What is cool, is that this file (and it’s references) include hash (SHA1), which allows us to use fixed-output
derivations without any pregeneration. We still rely on import-from-derivation, however it is called differently now — fromJson (readFile (fetchurl …))
.
It is possible to remove IFD using offline
argument. You should download 3 essential files though. Check source if
you want to go this route.
downloading assets now requires https in line 79.