-
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.
I made a fork of this here, which removes the impurity of having it offline/online, but instead uses the version 2 of the manifest.
builtins.fetchurl
, by using v2 of manifestassets/virtual/legacy
)Thanks for this impressive work!