Packaging
We use Nix to package plugins and server packages. This allows us declaratively compile packages and use them in Mineflake.
You can use any tools to build packages
Mineflake is not limited to Nix.
Introduction
Each package is simply a package.yml
file, server type required files, and files that are copied to the server directory.
You can read more about package manifest in manifest page.
Example package file structure of AuthMe for spigot
/bungee
server type:
.
├── package.yml
├── package.jar -> plugins/${manifest.name}-${manifest.version}.jar (AuthMe-5.6.0-SNAPSHOT-b2467.jar, for example)
├── plugins
│ └── AuthMe
│ ├── config.yml -> plugins/AuthMe/config.yml
│ ├── messages.yml -> plugins/AuthMe/messages.yml
This package produced 3 files:
${manifest.name}-${manifest.version}.jar
- AuthMe plugin jar file.plugins/AuthMe/config.yml
- AuthMe config file.plugins/AuthMe/messages.yml
- AuthMe messages file.
Directories for files are created automatically. Directories is not copied to the server directory.
Empty directories
If you want create a empty directory, you can create a empty file with .keep
extension.
Packaging with Nix
Usually you create a zip archive with all files and just download it.
package.nix | |
---|---|
-
We use IPFS to store packages. You can use any other URL.
-
You can use
nix-prefetch-url --unpack ${url}
to getsha256
hash.
But if package files are not statically-linked, you need to compile them.
package.nix | |
---|---|
buildMineflakePackage
is a function that simplifies package manifest creation.
You can use any Nix functions to build packages
You can use any Nix functions to build packages. For example, you can use buildGoModule
to build Go packages.
Only requirement is that you need to create a package.yml
and server type required files.