2022-01-08 13:03:26 +05:30
|
|
|
{
|
2022-03-13 21:48:46 +05:30
|
|
|
description = "A custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once (Fork of MultiMC)";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
|
|
|
flake-compat = { url = "github:edolstra/flake-compat"; flake = false; };
|
2022-10-18 12:31:48 +05:30
|
|
|
libnbtplusplus = { url = "github:PlaceholderMC/libnbtplusplus"; flake = false; };
|
2022-09-26 19:12:45 +05:30
|
|
|
tomlplusplus = { url = "github:marzer/tomlplusplus"; flake = false; };
|
2022-01-09 00:45:19 +05:30
|
|
|
};
|
2022-01-08 13:03:26 +05:30
|
|
|
|
2022-09-26 19:12:45 +05:30
|
|
|
outputs = { self, nixpkgs, libnbtplusplus, tomlplusplus, ... }:
|
2022-02-14 20:15:51 +05:30
|
|
|
let
|
2022-07-07 21:55:14 +05:30
|
|
|
# User-friendly version number.
|
2022-03-13 21:48:46 +05:30
|
|
|
version = builtins.substring 0 8 self.lastModifiedDate;
|
|
|
|
|
2022-07-07 21:55:14 +05:30
|
|
|
# Supported systems (qtbase is currently broken for "aarch64-darwin")
|
2022-03-13 21:48:46 +05:30
|
|
|
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" ];
|
|
|
|
|
|
|
|
# Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'.
|
|
|
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
|
|
|
|
2022-07-07 21:55:14 +05:30
|
|
|
# Nixpkgs instantiated for supported systems.
|
2022-03-13 21:48:46 +05:30
|
|
|
pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
|
2022-07-07 21:55:14 +05:30
|
|
|
|
|
|
|
packagesFn = pkgs: rec {
|
2022-10-18 12:31:48 +05:30
|
|
|
prismlauncher = pkgs.libsForQt5.callPackage ./nix { inherit version self libnbtplusplus tomlplusplus; };
|
|
|
|
prismlauncher-qt6 = pkgs.qt6Packages.callPackage ./nix { inherit version self libnbtplusplus tomlplusplus; };
|
2022-07-07 21:55:14 +05:30
|
|
|
};
|
2022-03-13 21:48:46 +05:30
|
|
|
in
|
|
|
|
{
|
2022-07-07 21:55:14 +05:30
|
|
|
packages = forAllSystems (system:
|
|
|
|
let packages = packagesFn pkgs.${system}; in
|
2022-10-18 12:31:48 +05:30
|
|
|
packages // { default = packages.prismlauncher; }
|
2022-07-07 21:55:14 +05:30
|
|
|
);
|
2022-03-13 21:48:46 +05:30
|
|
|
|
2022-07-07 21:55:14 +05:30
|
|
|
overlay = final: packagesFn;
|
2022-03-13 21:48:46 +05:30
|
|
|
};
|
2022-01-08 20:42:44 +05:30
|
|
|
}
|