mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 12:06:01 +01:00
Merge pull request #13540 from NixOS/mergify/bp/2.29-maintenance/pr-13535
Fix nix_system_cpu on i686-linux (backport #13535)
This commit is contained in:
commit
c1f54da018
2 changed files with 11 additions and 6 deletions
|
|
@ -1,9 +1,10 @@
|
|||
nix_system_cpu = {
|
||||
'ppc64' : 'powerpc64',
|
||||
'ppc64le' : 'powerpc64le',
|
||||
'ppc' : 'powerpc',
|
||||
'ppcle' : 'powerpcle',
|
||||
}.get(
|
||||
powerpc_system_cpus = [ 'ppc64', 'ppc' ]
|
||||
|
||||
nix_system_cpu = {'ppc64' : 'powerpc64', 'ppc' : 'powerpc', 'x86' : 'i686'}.get(
|
||||
host_machine.cpu_family(),
|
||||
host_machine.cpu_family(),
|
||||
)
|
||||
|
||||
if powerpc_system_cpus.contains(host_machine.cpu_family()) and host_machine.endian() == 'little'
|
||||
nix_system_cpu += 'le'
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -44,3 +44,7 @@ out="$(expectStderr 0 nix-instantiate --option foobar baz --expr '{}')"
|
|||
|
||||
out="$(expectStderr 0 nix-instantiate '{}' --option foobar baz --expr )"
|
||||
[[ "$(echo "$out" | grep foobar | wc -l)" = 1 ]]
|
||||
|
||||
if [[ $(uname) = Linux && $(uname -m) = i686 ]]; then
|
||||
[[ $(nix config show system) = i686-linux ]]
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue