Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions nix-meson-build-support/default-system-cpu/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
nix_system_cpu = {
'ppc64' : 'powerpc64',
'ppc64le' : 'powerpc64le',
'ppc' : 'powerpc',
'ppcle' : 'powerpcle',
}.get(
host_machine.cpu_family(),
host_machine.cpu_family(),
)
4 changes: 3 additions & 1 deletion src/libstore/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ configdata_priv = configuration_data()
# TODO rename, because it will conflict with downstream projects
configdata_priv.set_quoted('PACKAGE_VERSION', meson.project_version())

subdir('nix-meson-build-support/default-system-cpu')

# Used in public header.
configdata_pub.set_quoted(
'NIX_LOCAL_SYSTEM',
host_machine.cpu_family() + '-' + host_machine.system(),
nix_system_cpu + '-' + host_machine.system(),
description :
'This is the system name Nix expects for local running instance of Nix.\n\n'
+ 'See the "system" setting for additional details',
Expand Down
4 changes: 3 additions & 1 deletion tests/functional/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@ dot = find_program('dot', native : true, required : false)

nix_bin_dir = fs.parent(nix.full_path())

subdir('nix-meson-build-support/default-system-cpu')

test_confdata = {
'bindir': nix_bin_dir,
'coreutils': fs.parent(coreutils.full_path()),
'dot': dot.found() ? dot.full_path() : '',
'bash': bash.full_path(),
'sandbox_shell': busybox.found() ? busybox.full_path() : '',
'PACKAGE_VERSION': meson.project_version(),
'system': host_machine.cpu_family() + '-' + host_machine.system(),
'system': nix_system_cpu + '-' + host_machine.system(),
}

# Just configures `common/vars-and-functions.sh.in`.
Expand Down
1 change: 1 addition & 0 deletions tests/functional/nix-meson-build-support
1 change: 1 addition & 0 deletions tests/functional/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ mkMesonDerivation (

workDir = ./.;
fileset = fileset.unions [
../../nix-meson-build-support
../../scripts/nix-profile.sh.in
../../.version
../../tests/functional
Expand Down
Loading