What are the possible values of stdenv.hostPlatform.system

“x86_64-linux” is one. What are the others?

1 Like

Specifically, what will be the value of that field in an ia32 system?

So i686-linux is usually the 32-bit linux tuple. But the format should just be {ArchType}-{OSType} using names from https://llvm.org/doxygen/Triple_8h_source.html.

We have an incomplete list of each supported here:

I generally use the nix repl for this:

$ nix repl
Welcome to Nix version 2.3.2. Type :? for help.

nix-repl> :l <nixpkgs>
Added 11364 variables.

nix-repl> lib.platforms.i686
[ "i686-cygwin" "i686-freebsd" "i686-linux" "i686-netbsd" "i686-openbsd" "i686-darwin" "i686-windows" "i686-none" ]

nix-repl> lib.platforms.all
[ "aarch64-linux" "armv5tel-linux" "armv6l-linux" "armv7a-linux" "armv7l-linux" "mipsel-linux" "i686-cygwin" "i686-freebsd" "i686-linux" "i686-netbsd" "i686-openbsd" "x86_64-cygwin" "x86_64-freebsd" "x86_64-linux" "x86_64-netbsd" "x86_64-openbsd" "x86_64-solaris" "x86_64-darwin" "i686-darwin" "aarch64-darwin" "armv7a-darwin" "x86_64-windows" "i686-windows" "wasm64-wasi" "wasm32-wasi" "powerpc64le-linux" "riscv32-linux" "riscv64-linux" "aarch64-none" "avr-none" "arm-none" "i686-none" "x86_64-none" "powerpc-none" "msp430-none" "riscv64-none" "riscv32-none" "vc4-none" "js-ghcjs" ]
3 Likes