From 60e9d2754a720f3da47b2ffc1bfbc032e16d3262 Mon Sep 17 00:00:00 2001 From: meguminloli Date: Thu, 13 Jan 2022 12:57:35 +0200 Subject: [PATCH 1/3] changed flake.nix removed result --- flake.lock | 6 +++--- flake.nix | 63 ++++++++++++++++++++++-------------------------------- 2 files changed, 29 insertions(+), 40 deletions(-) diff --git a/flake.lock b/flake.lock index 2248b4a4..e759b98d 100644 --- a/flake.lock +++ b/flake.lock @@ -49,11 +49,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1641528457, - "narHash": "sha256-FyU9E63n1W7Ql4pMnhW2/rO9OftWZ37pLppn/c1aisY=", + "lastModified": 1641887635, + "narHash": "sha256-kDGpufwzVaiGe5e1sBUBPo9f1YN+nYHJlYqCaVpZTQQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "ff377a78794d412a35245e05428c8f95fef3951f", + "rev": "b2737d4980a17cc2b7d600d7d0b32fd7333aca88", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 47a13ac2..a3296ac5 100644 --- a/flake.nix +++ b/flake.nix @@ -15,41 +15,30 @@ flake = false; }; - outputs = inputs@{ self, nixpkgs, flake-utils, libnbtplusplus, quazip, ... }: - flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] (system: - let - pkgs = import nixpkgs { - inherit system; - }; - - packages = { - polymc = pkgs.libsForQt5.callPackage ./packages/nix/polymc { - inherit self; - submoduleQuazip = quazip; - submoduleNbt = libnbtplusplus; - }; - }; - - # 'nix flake check' fails - overlay = (final: prev: rec { - polymc = prev.libsForQt5.callPackage ./packages/nix/polymc { - inherit self; - submoduleQuazip = quazip; - submoduleNbt = libnbtplusplus; - }; - }); - - apps = { - polymc = flake-utils.lib.mkApp { - name = "polymc"; - drv = packages.polymc; - }; - }; - in - { - inherit packages overlay apps; - defaultPackage = packages.polymc; - defaultApp = apps.polymc; - } - ); + outputs = args@{ self, nixpkgs, flake-utils, libnbtplusplus, quazip, ... }: + { + overlay = final: prev: { + inherit (self.packages.${final.system}) + polymc; + }; + } // flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux"] (system: + let pkgs = import nixpkgs { + inherit system; + }; + in { + defaultPackage = self.packages.${system}.polymc; + packages = rec { + polymc = pkgs.libsForQt5.callPackage ./packages/nix/polymc { + inherit self; + submoduleQuazip = quazip; + submoduleNbt = libnbtplusplus; + }; + }; + apps = rec { + polymc = flake-utils.lib.mkApp { + name = "polymc"; + drv = self.packages.${system}.polymc; + }; + }; + }); } From f84fc783b614e42e54a3329bff2541fea697940e Mon Sep 17 00:00:00 2001 From: meguminloli Date: Thu, 13 Jan 2022 15:28:45 +0200 Subject: [PATCH 2/3] removed redundant recs removed file --- flake.nix | 48 +++++++++++++++++++++++------------------------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/flake.nix b/flake.nix index a3296ac5..798e9d30 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "PolyMC flake"; inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; inputs.flake-utils.url = "github:numtide/flake-utils"; - inputs.flake-compat = { + inputs.flake-compat = { url = "github:edolstra/flake-compat"; flake = false; }; @@ -16,29 +16,27 @@ }; outputs = args@{ self, nixpkgs, flake-utils, libnbtplusplus, quazip, ... }: - { - overlay = final: prev: { - inherit (self.packages.${final.system}) - polymc; - }; - } // flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux"] (system: - let pkgs = import nixpkgs { - inherit system; - }; - in { - defaultPackage = self.packages.${system}.polymc; - packages = rec { - polymc = pkgs.libsForQt5.callPackage ./packages/nix/polymc { - inherit self; - submoduleQuazip = quazip; - submoduleNbt = libnbtplusplus; - }; + { + overlay = final: prev: { + inherit (self.packages.${final.system}) polymc; }; - apps = rec { - polymc = flake-utils.lib.mkApp { - name = "polymc"; - drv = self.packages.${system}.polymc; - }; - }; - }); + } // flake-utils.lib.eachDefaultSystem (system: + 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; + }); } From b635a7e693569fc566df1860a4ffd1b225c69de6 Mon Sep 17 00:00:00 2001 From: Megumin <83077245+meguminloli@users.noreply.github.com> Date: Thu, 13 Jan 2022 15:43:29 +0200 Subject: [PATCH 3/3] update NIX.md --- packages/nix/NIX.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nix/NIX.md b/packages/nix/NIX.md index f778dac1..1ceba9a3 100644 --- a/packages/nix/NIX.md +++ b/packages/nix/NIX.md @@ -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 ]; ## ``` @@ -28,4 +28,4 @@ nixpkgs.overlays = [ ]; environment.systemPackages = with pkgs; [ polymc ]; -``` \ No newline at end of file +```