Install from the archive (x86_64 only)

May 22, 2023 ยท View on GitHub

This is the modified version of this page

Install from the archive (x86_64 only)

curl -s https://raw.githubusercontent.com/dnkmmr69420/nix-installer-scripts/main/tar-extracters/compiled-nix-x86_64-tar-extract.sh | bash

After this, go straight to After Setup

don't use the archive, it gives you errors. compile instead.

Compile

enter bash as root

sudo bash

Everything past this is ran as root in a root bash shell

next make the directory and cd into it

sudo rm -rf /opt/nix-git
mkdir -p /opt/nix-git
cd /opt/nix-git

Clone repo

git clone https://github.com/NixOS/nix.git
cd nix

type this

nix develop

type this

nix develop .#native-clang11StdenvPackages

type this

sudo rm -rf /opt/nixusr
mkdir -p /opt/nixusr

enter nix shell

nix-shell

type the following into nix-shell

./bootstrap.sh
./configure $configureFlags --prefix=/opt/nixusr
make -j $NIX_BUILD_CORES
make install
make installcheck -j $NIX_BUILD_CORES

check version

nix --version

exit nix-shell

exit

Run this script to copy needed dependencies that the compiler didn't compile

curl -s https://raw.githubusercontent.com/dnkmmr69420/nix-installer-scripts/main/compile-scripts/end-of-compile-setup.sh | bash -s 1.79.0

After the setup

Run the after setup

curl -s https://raw.githubusercontent.com/dnkmmr69420/nix-installer-scripts/main/other-scripts/nix-compile-after-setup.sh | bash -s /usr/local

Archive it

Making an archive to contribute

tar -czf nixusr.tar.gz /opt/nixusr