Linux Install

How to install Nift on Linux

Note: Currently if you install through Flatpak or Snap you will not be able to use the powerful scripting features that Nift has to their full extent, it is recommended that you instead install from source. I am trying to work out how to rectify this.

Linux installation using Snap

You can install Nift on linux using the Snap package manager, for instructions see here. Alternatively first install snapd, eg. sudo apt-get install snapd on Ubuntu, then enter:

		    						snap install nift
		    						sudo snap alias nift nsm

To uninstall Nift enter sudo snap unalias nsm and snap remove nift.

Linux installation using Flatpak

Thanks to refi64 for making the installation through Flatpak much easier and cleaner.

You can install Nift on linux using the Flatpak package manager. First install Flatpak then enter in to a terminal:

		    						flatpak install --user

Alternatively, download cc.nift.nsm.flatpakref to ~/Downloads then open up a terminal and enter:

		    						flatpak install cc.nift.nsm.flatpakref

Note you can just open cc.nift.nsm.flatpakref in GNOME Software or KDE Discover if you have either of those.

Then add the following aliases to ~/.bashrc (or the equivalent to the configuration profile file for your shell):

		    						alias nsm="flatpak run cc.nift.nsm"
		    						alias nift="flatpak run cc.nift.nsm" 

To uninstall Nift remove the aliases from ~/.bashrc and enter flatpak uninstall nift, if that doesn't work try flatpak uninstall cc.nift.nsm and if that fails try:

		    						flatpak uninstall cc.nift.nsm/x86_64/stable

Installing Nift on linux from source

Installing a c++ compiler

If you do not already have a c++ compiler then you will need to install one.

Use your package manager to install build-essential. For example on Ubuntu, run sudo apt-get install build-essential from a terminal window.

Installing Nift

Download nsm-master-*.zip, then follow these steps to compile and install:
  1. Extract nsm-master-* from nsm-master-*.zip;
  2. Open a terminal window and change directory to nsm-master-*;
  3. Compile nsm by running make;
  4. Install nsm by running sudo make linux-install (note - you will need to enter your password) (note - you may need to open a new terminal window for nsm installation to be recognised);
  5. Delete both the file nsm-master-*.zip and the directory nsm-master-* containing the uncompiled code.

For example, if you unzipped nsm-master-* inside your downloads folder, then steps 1-4 are achieved by entering the following into your terminal window:

		    							cd ~/Downloads/nsm-master-*
		    							sudo make linux-install

You can use make linux-gedit-highlighting on top of make install during step 3 to get gedit (do you gedit yet?) to automatically use html syntax highlighting for both *.content and *.template files.

Uninstalling Nift

Should you ever want to remove nsm from your machine, simply run sudo make linux-uninstall.