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; };
|
|
|
|
libnbtplusplus = { url = "github:multimc/libnbtplusplus"; flake = false; };
|
2022-01-08 19:15:19 +00:00
|
|
|
};
|
2022-01-08 07:33:26 +00:00
|
|
|
|
2022-05-27 20:23:33 +01:00
|
|
|
outputs = { self, nixpkgs, libnbtplusplus, ... }:
|
2022-02-14 14:45:51 +00:00
|
|
|
let
|
2022-03-13 16:18:46 +00:00
|
|
|
# Generate a user-friendly version number.
|
|
|
|
version = builtins.substring 0 8 self.lastModifiedDate;
|
|
|
|
|
|
|
|
# System types to support (qtbase is currently broken for "aarch64-darwin")
|
|
|
|
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;
|
|
|
|
|
|
|
|
# Nixpkgs instantiated for supported system types.
|
|
|
|
pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
|
|
|
|
in
|
|
|
|
{
|
2022-06-04 02:26:46 +01:00
|
|
|
packages = forAllSystems (system: rec {
|
2022-05-27 20:42:23 +01:00
|
|
|
polymc = pkgs.${system}.libsForQt5.callPackage ./nix { inherit version self libnbtplusplus; };
|
|
|
|
polymc-qt6 = pkgs.${system}.qt6Packages.callPackage ./nix { inherit version self libnbtplusplus; };
|
2022-06-04 02:26:46 +01:00
|
|
|
|
|
|
|
default = polymc;
|
2022-05-27 20:42:23 +01:00
|
|
|
});
|
|
|
|
|
2022-06-04 02:26:46 +01:00
|
|
|
defaultPackage = forAllSystems (system: self.packages.${system}.default);
|
2022-03-13 16:18:46 +00:00
|
|
|
|
2022-06-04 02:26:46 +01:00
|
|
|
apps = forAllSystems (system: rec { polymc = { type = "app"; program = "${self.defaultPackage.${system}}/bin/polymc"; }; default = polymc; });
|
|
|
|
defaultApp = forAllSystems (system: self.apps.${system}.default);
|
2022-03-13 16:18:46 +00:00
|
|
|
|
|
|
|
overlay = final: prev: { polymc = self.defaultPackage.${final.system}; };
|
|
|
|
};
|
2022-01-08 15:12:44 +00:00
|
|
|
}
|