sneedmc/flake.nix

51 lines
1.4 KiB
Nix
Raw Normal View History

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-13 13:28:45 +00:00
inputs.flake-compat = {
2022-01-09 06:08:39 +00:00
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 = {
2022-02-04 07:13:48 +00:00
url = "github:stachenov/quazip";
2022-01-08 19:15:19 +00:00
flake = false;
};
2022-01-08 07:33:26 +00:00
2022-01-13 10:57:35 +00: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 13:28:45 +00:00
overlay = final: prev: {
inherit (self.packages.${final.system}) polymc;
2022-01-13 10:57:35 +00:00
};
} // flake-utils.lib.eachSystem systems (system:
2022-01-13 13:28:45 +00: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;
});
}