Merge pull request #61 from meguminloli/develop
This commit is contained in:
commit
b07853c9ef
@ -49,11 +49,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1641528457,
|
"lastModified": 1641887635,
|
||||||
"narHash": "sha256-FyU9E63n1W7Ql4pMnhW2/rO9OftWZ37pLppn/c1aisY=",
|
"narHash": "sha256-kDGpufwzVaiGe5e1sBUBPo9f1YN+nYHJlYqCaVpZTQQ=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "ff377a78794d412a35245e05428c8f95fef3951f",
|
"rev": "b2737d4980a17cc2b7d600d7d0b32fd7333aca88",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
39
flake.nix
39
flake.nix
@ -2,7 +2,7 @@
|
|||||||
description = "PolyMC flake";
|
description = "PolyMC flake";
|
||||||
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||||
inputs.flake-compat = {
|
inputs.flake-compat = {
|
||||||
url = "github:edolstra/flake-compat";
|
url = "github:edolstra/flake-compat";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
@ -15,13 +15,14 @@
|
|||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{ self, nixpkgs, flake-utils, libnbtplusplus, quazip, ... }:
|
outputs = args@{ self, nixpkgs, flake-utils, libnbtplusplus, quazip, ... }:
|
||||||
flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] (system:
|
{
|
||||||
let
|
overlay = final: prev: {
|
||||||
pkgs = import nixpkgs {
|
inherit (self.packages.${final.system}) polymc;
|
||||||
inherit system;
|
};
|
||||||
};
|
} // flake-utils.lib.eachDefaultSystem (system:
|
||||||
|
let pkgs = import nixpkgs { inherit system; };
|
||||||
|
in {
|
||||||
packages = {
|
packages = {
|
||||||
polymc = pkgs.libsForQt5.callPackage ./packages/nix/polymc {
|
polymc = pkgs.libsForQt5.callPackage ./packages/nix/polymc {
|
||||||
inherit self;
|
inherit self;
|
||||||
@ -29,27 +30,13 @@
|
|||||||
submoduleNbt = libnbtplusplus;
|
submoduleNbt = libnbtplusplus;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# 'nix flake check' fails
|
|
||||||
overlay = (final: prev: rec {
|
|
||||||
polymc = prev.libsForQt5.callPackage ./packages/nix/polymc {
|
|
||||||
inherit self;
|
|
||||||
submoduleQuazip = quazip;
|
|
||||||
submoduleNbt = libnbtplusplus;
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
apps = {
|
apps = {
|
||||||
polymc = flake-utils.lib.mkApp {
|
polymc = flake-utils.lib.mkApp {
|
||||||
name = "polymc";
|
name = "polymc";
|
||||||
drv = packages.polymc;
|
drv = self.packages.${system}.polymc;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
defaultPackage = self.packages.${system}.polymc;
|
||||||
{
|
defaultApp = self.apps.${system}.polymc;
|
||||||
inherit packages overlay apps;
|
});
|
||||||
defaultPackage = packages.polymc;
|
|
||||||
defaultApp = apps.polymc;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ inputs = {
|
|||||||
|
|
||||||
...
|
...
|
||||||
|
|
||||||
nixpkgs.overlays = [ inputs.polymc.overlay.${system} ]; ## Within configuration.nix
|
nixpkgs.overlays = [ inputs.polymc.overlay ]; ## Within configuration.nix
|
||||||
environment.systemPackages = with pkgs; [ polymc ]; ##
|
environment.systemPackages = with pkgs; [ polymc ]; ##
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -28,4 +28,4 @@ nixpkgs.overlays = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [ polymc ];
|
environment.systemPackages = with pkgs; [ polymc ];
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user