haskell.nix icon indicating copy to clipboard operation
haskell.nix copied to clipboard

Using `--system aarch64-linux` on `x86_64-linux` fails

Open hamishmack opened this issue 4 years ago • 1 comments

I would expect this to use the available aarch64 build machine, but instead it fails.

To reproduce run:

nix-build --system aarch64-linux -E '((import ./. {}).pkgs-unstable.haskell-nix.tool "ghc884" "hello" {})'

This fails with:

while setting up the build environment: executing '/nix/store/...-bash-4.4-p23/bin/bash': Exec format error

hamishmack avatar Aug 24 '21 07:08 hamishmack

With the addition of evalSystem in #1546 it is now possible to be explicit about the eval system and this works when run on an x86_64-linux system:

nix-build --system aarch64-linux -E '((import ./. {}).pkgs-unstable.haskell-nix.tool "ghc8107" "hello" { evalSystem = "x86_64-linux"; })'

However both these still fail and perhaps should work:

 nix-build --system aarch64-linux -E '((import ./. {}).pkgs-unstable.haskell-nix.tool "ghc8107" "hello" {})'
 nix-build --system aarch64-linux -E '((import ./. {}).pkgs-unstable.haskell-nix.tool "ghc8107" "hello" { evalSystem = "aarch64-linux"; })'

hamishmack avatar Jul 28 '22 10:07 hamishmack