2022-01-08 07:33:26 +00:00
|
|
|
{
|
2022-03-13 16:18:46 +00:00
|
|
|
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-07-18 19:32:54 +01:00
|
|
|
libnbtplusplus = { url = "github:PolyMC/libnbtplusplus"; flake = false; };
|
2022-09-26 14:42:45 +01:00
|
|
|
tomlplusplus = { url = "github:marzer/tomlplusplus"; flake = false; };
|
2022-01-08 19:15:19 +00:00
|
|
|
};
|
2022-01-08 07:33:26 +00:00
|
|
|
|
2022-09-26 14:42:45 +01:00
|
|
|
outputs = { self, nixpkgs, libnbtplusplus, tomlplusplus, ... }:
|
2022-02-14 14:45:51 +00:00
|
|
|
let
|
2022-07-07 17:25:14 +01:00
|
|
|
# User-friendly version number.
|
2022-03-13 16:18:46 +00:00
|
|
|
version = builtins.substring 0 8 self.lastModifiedDate;
|
|
|
|
|
2022-07-07 17:25:14 +01:00
|
|
|
# Supported systems (qtbase is currently broken for "aarch64-darwin")
|
2022-03-13 16:18:46 +00:00
|
|
|
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 17:25:14 +01:00
|
|
|
# Nixpkgs instantiated for supported systems.
|
2022-03-13 16:18:46 +00:00
|
|
|
pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
|
2022-07-07 17:25:14 +01:00
|
|
|
|
|
|
|
packagesFn = pkgs: rec {
|
2022-09-26 14:42:45 +01:00
|
|
|
polymc = pkgs.libsForQt5.callPackage ./nix { inherit version self libnbtplusplus tomlplusplus; };
|
|
|
|
polymc-qt6 = pkgs.qt6Packages.callPackage ./nix { inherit version self libnbtplusplus tomlplusplus; };
|
2022-07-07 17:25:14 +01:00
|
|
|
};
|
2022-03-13 16:18:46 +00:00
|
|
|
in
|
|
|
|
{
|
2022-07-07 17:25:14 +01:00
|
|
|
packages = forAllSystems (system:
|
|
|
|
let packages = packagesFn pkgs.${system}; in
|
|
|
|
packages // { default = packages.polymc; }
|
|
|
|
);
|
2022-03-13 16:18:46 +00:00
|
|
|
|
2022-07-07 17:25:14 +01:00
|
|
|
overlay = final: packagesFn;
|
2022-03-13 16:18:46 +00:00
|
|
|
};
|
2022-01-08 15:12:44 +00:00
|
|
|
}
|