From 0ec2170b5ed8588ee8ddc60a2bdf460b7dc7bbf0 Mon Sep 17 00:00:00 2001 From: cidkidnix Date: Sat, 8 Jan 2022 09:27:47 -0600 Subject: [PATCH 1/9] Add documentation for nix package --- packages/nix/NIX.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 packages/nix/NIX.md diff --git a/packages/nix/NIX.md b/packages/nix/NIX.md new file mode 100644 index 000000000..3013acb69 --- /dev/null +++ b/packages/nix/NIX.md @@ -0,0 +1,26 @@ +# How to import + +To import with flakes use +```nix +inputs = { + polymc.url = "github:PolyMC/PolyMC"; +}; + +... + +nixpkgs.overlays = [ inputs.polymc.overlay ]; ## Within configuration.nix +``` + +To import without flakes use channels: + +``` +sudo -i nix-channel --add https://github.com/PolyMC/PolyMC/archive/master.tar.gz polymc +sudo -i nix-channel --update polymc +``` +add `` to imports in your `configuration.nix` + +```nix +imports = [ + "/packages/nix/overlay.nix +]; +``` \ No newline at end of file From e665d520444668b2b1fa58269f8fc60f5db56473 Mon Sep 17 00:00:00 2001 From: cidkidnix Date: Sat, 8 Jan 2022 09:28:37 -0600 Subject: [PATCH 2/9] add missing char --- packages/nix/NIX.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nix/NIX.md b/packages/nix/NIX.md index 3013acb69..5d2168514 100644 --- a/packages/nix/NIX.md +++ b/packages/nix/NIX.md @@ -21,6 +21,6 @@ add `` to imports in your `configuration.nix` ```nix imports = [ - "/packages/nix/overlay.nix + "/packages/nix/overlay.nix" ]; ``` \ No newline at end of file From e544637333d2a3a0259dc9614b6a27911e681147 Mon Sep 17 00:00:00 2001 From: cidkidnix Date: Sat, 8 Jan 2022 09:30:51 -0600 Subject: [PATCH 3/9] Add to README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0ff8e3e22..0eb54a62c 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ This is a **fork** of the MultiMC Launcher and not endorsed by MultiMC. The Poly Several source build packages are available, along with experimental pre-built generic packages. - An [AUR package](https://aur.archlinux.org/packages/polymc-git/) is available. +- A Nix derivation is available in repo [Nix](https://github.com/PolyMC/PolyMC/blob/develop/packages/nix/NIX.md) - A Gentoo ebuild is available in the [swirl](https://git.swurl.xyz/swirl/ebuilds) overlay, named `games-action/polymc`. Check the README for instructions on how to add the overlay. - A Flatpak is available in [Flathub](https://flathub.org/apps/details/org.polymc.PolyMC). You can install it from there or build it yourself using [this source](https://github.com/flathub/org.polymc.PolyMC). - Generic, prebuilt packages (archived by version) can be found [here](https://packages.polymc.org/) ([latest](https://packages.polymc.org/latest)). From 2776453dfe91cb02f960985cfef157b889dbd340 Mon Sep 17 00:00:00 2001 From: cidkidnix Date: Sat, 8 Jan 2022 09:31:50 -0600 Subject: [PATCH 4/9] Make README.md look better for nix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0eb54a62c..2585a18bd 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ This is a **fork** of the MultiMC Launcher and not endorsed by MultiMC. The Poly Several source build packages are available, along with experimental pre-built generic packages. - An [AUR package](https://aur.archlinux.org/packages/polymc-git/) is available. -- A Nix derivation is available in repo [Nix](https://github.com/PolyMC/PolyMC/blob/develop/packages/nix/NIX.md) +- A [Nix](https://github.com/PolyMC/PolyMC/blob/develop/packages/nix/NIX.md) derivation is available in repo - A Gentoo ebuild is available in the [swirl](https://git.swurl.xyz/swirl/ebuilds) overlay, named `games-action/polymc`. Check the README for instructions on how to add the overlay. - A Flatpak is available in [Flathub](https://flathub.org/apps/details/org.polymc.PolyMC). You can install it from there or build it yourself using [this source](https://github.com/flathub/org.polymc.PolyMC). - Generic, prebuilt packages (archived by version) can be found [here](https://packages.polymc.org/) ([latest](https://packages.polymc.org/latest)). From 15f62e54ab833993404f3e93ed6abd0deeefac1a Mon Sep 17 00:00:00 2001 From: cidkidnix Date: Sun, 9 Jan 2022 04:12:55 -0600 Subject: [PATCH 5/9] Make readme reflect new flake changes --- README.md | 2 +- packages/nix/NIX.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2585a18bd..16e399cf8 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ This is a **fork** of the MultiMC Launcher and not endorsed by MultiMC. The Poly Several source build packages are available, along with experimental pre-built generic packages. - An [AUR package](https://aur.archlinux.org/packages/polymc-git/) is available. -- A [Nix](https://github.com/PolyMC/PolyMC/blob/develop/packages/nix/NIX.md) derivation is available in repo +- A [Nix](packages/nix/NIX.md) derivation is available in repo. - A Gentoo ebuild is available in the [swirl](https://git.swurl.xyz/swirl/ebuilds) overlay, named `games-action/polymc`. Check the README for instructions on how to add the overlay. - A Flatpak is available in [Flathub](https://flathub.org/apps/details/org.polymc.PolyMC). You can install it from there or build it yourself using [this source](https://github.com/flathub/org.polymc.PolyMC). - Generic, prebuilt packages (archived by version) can be found [here](https://packages.polymc.org/) ([latest](https://packages.polymc.org/latest)). diff --git a/packages/nix/NIX.md b/packages/nix/NIX.md index 5d2168514..572c1d176 100644 --- a/packages/nix/NIX.md +++ b/packages/nix/NIX.md @@ -8,7 +8,7 @@ inputs = { ... -nixpkgs.overlays = [ inputs.polymc.overlay ]; ## Within configuration.nix +nixpkgs.overlays = [ inputs.polymc.overlay.${system} ]; ## Within configuration.nix ``` To import without flakes use channels: From 8ccef671d5be518b500aa83137ea5a39005f1bf1 Mon Sep 17 00:00:00 2001 From: cidkidnix Date: Sun, 9 Jan 2022 08:15:47 -0600 Subject: [PATCH 6/9] Update instructions --- packages/nix/NIX.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/nix/NIX.md b/packages/nix/NIX.md index 572c1d176..d11ffbb94 100644 --- a/packages/nix/NIX.md +++ b/packages/nix/NIX.md @@ -16,11 +16,13 @@ To import without flakes use channels: ``` sudo -i nix-channel --add https://github.com/PolyMC/PolyMC/archive/master.tar.gz polymc sudo -i nix-channel --update polymc +nix-env -iA polymc ``` -add `` to imports in your `configuration.nix` -```nix -imports = [ - "/packages/nix/overlay.nix" -]; +or alternatively you can use + +``` +nixpkgs.overlays = [ + (import (builtins.fetchTarball "https://github.com/lourkeur/PolyMC/archive/develop.tar.gz")).overlay +] ``` \ No newline at end of file From fe9ce7a329b16d6868d3155de845b96b6aa75d3f Mon Sep 17 00:00:00 2001 From: cidkidnix Date: Sun, 9 Jan 2022 08:17:52 -0600 Subject: [PATCH 7/9] Make instuctions more clear --- packages/nix/NIX.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/nix/NIX.md b/packages/nix/NIX.md index d11ffbb94..1d2769281 100644 --- a/packages/nix/NIX.md +++ b/packages/nix/NIX.md @@ -9,6 +9,7 @@ inputs = { ... nixpkgs.overlays = [ inputs.polymc.overlay.${system} ]; ## Within configuration.nix +environment.systemPackages = with pkgs; [ polymc ]; ## ``` To import without flakes use channels: @@ -24,5 +25,7 @@ or alternatively you can use ``` nixpkgs.overlays = [ (import (builtins.fetchTarball "https://github.com/lourkeur/PolyMC/archive/develop.tar.gz")).overlay -] +]; + +environment.systemPackages = with pkgs; [ polymc ]; ``` \ No newline at end of file From 0ce1b68261d70a8e6009335c59442d4d3508ac65 Mon Sep 17 00:00:00 2001 From: cidkid <67574902+cidkidnix@users.noreply.github.com> Date: Sun, 9 Jan 2022 08:35:52 -0600 Subject: [PATCH 8/9] Don't import channel as root, import channel as user Co-authored-by: Louis Bettens --- 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 1d2769281..d9a8a884f 100644 --- a/packages/nix/NIX.md +++ b/packages/nix/NIX.md @@ -15,8 +15,8 @@ environment.systemPackages = with pkgs; [ polymc ]; ## To import without flakes use channels: ``` -sudo -i nix-channel --add https://github.com/PolyMC/PolyMC/archive/master.tar.gz polymc -sudo -i nix-channel --update polymc +nix-channel --add https://github.com/PolyMC/PolyMC/archive/master.tar.gz polymc +nix-channel --update polymc nix-env -iA polymc ``` From 9bd86f84ded95b1f6d333deff2ef7aa04e38d9c4 Mon Sep 17 00:00:00 2001 From: cidkid <67574902+cidkidnix@users.noreply.github.com> Date: Sun, 9 Jan 2022 08:37:47 -0600 Subject: [PATCH 9/9] nix: make sure tarball is pointed to proper repo Co-authored-by: Louis Bettens --- packages/nix/NIX.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nix/NIX.md b/packages/nix/NIX.md index d9a8a884f..f778dac19 100644 --- a/packages/nix/NIX.md +++ b/packages/nix/NIX.md @@ -24,7 +24,7 @@ or alternatively you can use ``` nixpkgs.overlays = [ - (import (builtins.fetchTarball "https://github.com/lourkeur/PolyMC/archive/develop.tar.gz")).overlay + (import (builtins.fetchTarball "https://github.com/PolyMC/PolyMC/archive/develop.tar.gz")).overlay ]; environment.systemPackages = with pkgs; [ polymc ];