diff --git a/README.md b/README.md index 1e72ada3..e695ccf3 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ Several source build packages are available, along with experimental pre-built g Download on Flathub
[![AUR package](https://img.shields.io/aur/version/polymc-git)](https://aur.archlinux.org/packages/polymc-git/) +- 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. - The Flatpak can be built using [this source](https://github.com/flathub/org.polymc.PolyMC). - An RPM package is available, by going to the `packages/rpm` directory and running `./makerpm.sh`. diff --git a/packages/nix/NIX.md b/packages/nix/NIX.md new file mode 100644 index 00000000..f778dac1 --- /dev/null +++ b/packages/nix/NIX.md @@ -0,0 +1,31 @@ +# How to import + +To import with flakes use +```nix +inputs = { + polymc.url = "github:PolyMC/PolyMC"; +}; + +... + +nixpkgs.overlays = [ inputs.polymc.overlay.${system} ]; ## Within configuration.nix +environment.systemPackages = with pkgs; [ polymc ]; ## +``` + +To import without flakes use channels: + +``` +nix-channel --add https://github.com/PolyMC/PolyMC/archive/master.tar.gz polymc +nix-channel --update polymc +nix-env -iA polymc +``` + +or alternatively you can use + +``` +nixpkgs.overlays = [ + (import (builtins.fetchTarball "https://github.com/PolyMC/PolyMC/archive/develop.tar.gz")).overlay +]; + +environment.systemPackages = with pkgs; [ polymc ]; +``` \ No newline at end of file