Getting started with Nix on ppc64le

Starting from a working Nix 2.3 environment using the steps above, I was able to further bootstrap the nixos-22.05-small branch of nixpkgs (including Nix 2.8, and flake support!)

I’m generally finding it easier to work from the nixpkgs repo rather than the nix repo, since that’s where the necessary changes are needed. I’ve cherry-picked some fixes into this 22.05 branch sufficient to enable the packages I want to build. The 22.11 branch is not working for me yet.

git clone https://github.com/ChadSki/nixpkgs.git -b nixos-22.05-small-ppc64le
cd nixpkgs
nix-env -f . -iA nix

After upgrading Nix to 2.8, I was able to build and install these packages

nix-env -f . -iA fd glances gotop neofetch ripgrep

I was a bit surprised that it’s no longer necessary to update the bootstrap binaries manually. It must be pulling artifacts from Hydra these days? But here are the steps in case it seems necessary for some reason:

nix-build ./pkgs/stdenv/linux/make-bootstrap-tools.nix -A bootstrapFiles
cp result ./pkgs/stdenv/linux/bootstrap-files/bootstrap-tools.tar.xz
cp result-2 ./pkgs/stdenv/linux/bootstrap-files/busybox

then edit ./pkgs/stdenv/linux/bootstrap-files/default.nix to refer to those two artifacts.

1 Like