2022-01-08 07:33:26 +00:00
|
|
|
{
|
2022-01-08 18:33:50 +00:00
|
|
|
description = "PolyMC flake";
|
|
|
|
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
|
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
2022-01-09 06:08:39 +00:00
|
|
|
inputs.flake-compat = {
|
|
|
|
url = "github:edolstra/flake-compat";
|
|
|
|
flake = false;
|
|
|
|
};
|
2022-01-08 19:15:19 +00:00
|
|
|
inputs.libnbtplusplus = {
|
|
|
|
url = "github:multimc/libnbtplusplus";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
inputs.quazip = {
|
|
|
|
url = "github:multimc/quazip";
|
|
|
|
flake = false;
|
|
|
|
};
|
2022-01-08 07:33:26 +00:00
|
|
|
|
2022-01-08 19:15:19 +00:00
|
|
|
outputs = inputs@{ self, nixpkgs, flake-utils, libnbtplusplus, quazip, ... }:
|
2022-01-08 18:33:50 +00:00
|
|
|
flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] (system:
|
|
|
|
let
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
};
|
2022-01-09 06:08:39 +00:00
|
|
|
|
2022-01-08 18:33:50 +00:00
|
|
|
packages = {
|
2022-01-08 19:15:19 +00:00
|
|
|
polymc = pkgs.libsForQt5.callPackage ./packages/nix/polymc {
|
|
|
|
inherit self;
|
|
|
|
submoduleQuazip = quazip;
|
|
|
|
submoduleNbt = libnbtplusplus;
|
|
|
|
};
|
|
|
|
};
|
2022-01-09 06:08:39 +00:00
|
|
|
|
|
|
|
# 'nix flake check' fails
|
2022-01-08 20:23:55 +00:00
|
|
|
overlay = (final: prev: rec {
|
2022-01-08 22:23:53 +00:00
|
|
|
polymc = prev.libsForQt5.callPackage ./packages/nix/polymc {
|
|
|
|
inherit self;
|
|
|
|
submoduleQuazip = quazip;
|
|
|
|
submoduleNbt = libnbtplusplus;
|
|
|
|
};
|
2022-01-08 20:23:55 +00:00
|
|
|
});
|
2022-01-08 19:15:19 +00:00
|
|
|
|
2022-01-08 18:33:50 +00:00
|
|
|
apps = {
|
|
|
|
polymc = flake-utils.lib.mkApp {
|
2022-01-08 23:40:13 +00:00
|
|
|
name = "polymc";
|
2022-01-08 18:33:50 +00:00
|
|
|
drv = packages.polymc;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
2022-01-08 19:15:19 +00:00
|
|
|
inherit packages overlay apps;
|
2022-01-08 18:33:50 +00:00
|
|
|
defaultPackage = packages.polymc;
|
|
|
|
defaultApp = apps.polymc;
|
|
|
|
}
|
|
|
|
);
|
2022-01-08 15:12:44 +00:00
|
|
|
}
|