Fjord Launcher is packaged in nixpkgs since 22.11.
See Package variants for a list of available packages.
We use cachix to cache our development and release builds.
If you want to avoid rebuilds you may add the Cachix bucket to your substitutors, or use --accept-flake-config
to temporarily enable it when using nix
commands.
Example (NixOS):
{
nix.settings = {
trusted-substituters = [ "https://unmojang.cachix.org" ];
trusted-public-keys = [
"unmojang.cachix.org-1:OfHnbBNduZ6Smx9oNbLFbYyvOWSoxb2uPcnXPj4EDQY="
];
};
}
After adding github:unmojang/FjordLauncher
to your flake inputs, you can access the flake's packages
output.
Example:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
fjordlauncher = {
url = "github:unmojang/FjordLauncher";
# Optional: Override the nixpkgs input of fjordlauncher to use the same revision as the rest of your flake
# Note that this may break the reproducibility mentioned above, and you might not be able to access the binary cache
#
# inputs.nixpkgs.follows = "nixpkgs";
# This is not required for Flakes
inputs.flake-compat.follows = "";
};
};
outputs =
{ nixpkgs, fjordlauncher, ... }:
{
nixosConfigurations.foo = nixpkgs.lib.nixosSystem {
modules = [
./configuration.nix
(
{ pkgs, ... }:
{
environment.systemPackages = [ fjordlauncher.packages.${pkgs.system}.fjordlauncher ];
}
)
];
};
};
}
Alternatively, if you don't want to use our packages
output, you can add our overlay to your nixpkgs instance.
This will ensure Fjord is built with your system's packages.
Warning
Depending on what revision of nixpkgs your system uses, this may result in binaries that differ from the above packages
output
If this is the case, you will not be able to use the binary cache
Example:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
fjordlauncher = {
url = "github:unmojang/FjordLauncher";
# Optional: Override the nixpkgs input of fjordlauncher to use the same revision as the rest of your flake
# Note that this may break the reproducibility mentioned above, and you might not be able to access the binary cache
#
# inputs.nixpkgs.follows = "nixpkgs";
# This is not required for Flakes
inputs.flake-compat.follows = "";
};
};
outputs =
{ nixpkgs, fjordlauncher, ... }:
{
nixosConfigurations.foo = nixpkgs.lib.nixosSystem {
modules = [
./configuration.nix
(
{ pkgs, ... }:
{
nixpkgs.overlays = [ fjordlauncher.overlays.default ];
environment.systemPackages = [ pkgs.fjordlauncher ];
}
)
];
};
};
}
You can simply call the default package of this flake.
Example:
nix run github:unmojang/FjordLauncher
nix shell github:unmojang/FjordLauncher
nix profile install github:unmojang/FjordLauncher
We use Cachix to cache our development and release builds. If you want to avoid rebuilds you may add the Cachix bucket to your substitutors.
Example (NixOS):
{
nix.settings = {
trusted-substituters = [ "https://unmojang.cachix.org" ];
trusted-public-keys = [
"unmojang.cachix.org-1:OfHnbBNduZ6Smx9oNbLFbYyvOWSoxb2uPcnXPj4EDQY="
];
};
}
We use flake-compat to allow using this Flake on a system that doesn't use flakes.
Example:
{ pkgs, ... }:
{
environment.systemPackages = [
(import (
builtins.fetchTarball "https://github.com/FjordLauncher/FjordLauncher/archive/develop.tar.gz"
)).packages.${pkgs.system}.fjordlauncher
];
}
Alternatively, if you don't want to use our packages
output, you can add our overlay to your instance of nixpkgs.
This results in Fjord using your system's libraries
Example:
{ pkgs, ... }:
{
nixpkgs.overlays = [
(import (
builtins.fetchTarball "https://github.com/FjordLauncher/FjordLauncher/archive/develop.tar.gz"
)).overlays.default
];
environment.systemPackages = [ pkgs.fjordlauncher ];
}
You can add this repository as a channel and install its packages that way.
Example:
nix-channel --add https://github.com/unmojang/FjordLauncher/archive/develop.tar.gz fjordlauncher
nix-channel --update fjordlauncher
nix-env -iA fjordlauncher.fjordlauncher
Both Nixpkgs and this repository offer the following packages:
fjordlauncher
- The preferred build, wrapped with everything necessary to run the launcher and Minecraftfjordlauncher-unwrapped
- A minimal build that allows for advanced customization of the launcher's runtime environment
The wrapped package (fjordlauncher
) offers some build parameters to further customize the launcher's environment.
The following parameters can be overridden:
additionalLibs
(default:[ ]
) Additional libraries that will be added toLD_LIBRARY_PATH
additionalPrograms
(default:[ ]
) Additional libraries that will be added toPATH
controllerSupport
(default:isLinux
) Turn on/off support for controllers on Linux (macOS will always have this)gamemodeSupport
(default:isLinux
) Turn on/off support for Feral GameMode on Linuxjdks
(default:[ jdk21 jdk17 jdk8 ]
) Java runtimes added toFJORDLAUNCHER_JAVA_PATHS
variablemsaClientID
(default:null
, requires full rebuild!) Client ID used for Microsoft AuthenticationtextToSpeechSupport
(default:isLinux
) Turn on/off support for text-to-speech on Linux (macOS will always have this)withWaylandGLFW
(default:isLinux
) Build with support for native Wayland via a custom GLFW