PrismLauncher/flake.nix

51 lines
1.4 KiB
Nix
Raw Permalink Normal View History

2022-01-08 01:33:26 -06:00
{
2022-01-08 21:33:50 +03:00
description = "PolyMC flake";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
2022-01-13 15:28:45 +02:00
inputs.flake-compat = {
2022-01-09 09:08:39 +03:00
url = "github:edolstra/flake-compat";
flake = false;
};
2022-01-08 22:15:19 +03:00
inputs.libnbtplusplus = {
url = "github:multimc/libnbtplusplus";
flake = false;
};
inputs.quazip = {
2022-02-04 02:13:48 -05:00
url = "github:stachenov/quazip";
2022-01-08 22:15:19 +03:00
flake = false;
};
2022-01-08 01:33:26 -06:00
2022-01-13 12:57:35 +02:00
outputs = args@{ self, nixpkgs, flake-utils, libnbtplusplus, quazip, ... }:
let
systems = [
"aarch64-linux"
# "aarch64-darwin" # qtbase is currently broken
"i686-linux"
"x86_64-darwin"
"x86_64-linux"
];
in {
2022-01-13 15:28:45 +02:00
overlay = final: prev: {
inherit (self.packages.${final.system}) polymc;
2022-01-13 12:57:35 +02:00
};
} // flake-utils.lib.eachSystem systems (system:
2022-01-13 15:28:45 +02:00
let pkgs = import nixpkgs { inherit system; };
in {
packages = {
polymc = pkgs.libsForQt5.callPackage ./packages/nix/polymc {
inherit self;
submoduleQuazip = quazip;
submoduleNbt = libnbtplusplus;
};
};
apps = {
polymc = flake-utils.lib.mkApp {
name = "polymc";
drv = self.packages.${system}.polymc;
};
};
defaultPackage = self.packages.${system}.polymc;
defaultApp = self.apps.${system}.polymc;
});
}