pollymc/flake.nix

56 lines
1.4 KiB
Nix
Raw Normal View History

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