Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
23fb4ff
Bump version
edolstra Jul 12, 2025
38a2866
libstore: fix Unix sockets in the build directory on sandboxed macOS
emilazy Jun 27, 2025
17fc0f4
Merge pull request #13472 from NixOS/mergify/bp/2.30-maintenance/pr-1…
edolstra Jul 14, 2025
31ea1d3
Make nix help shell work by handling aliases properly
oknyshuk Jul 17, 2025
7f5709c
Merge pull request #13500 from NixOS/mergify/bp/2.30-maintenance/pr-1…
Mic92 Jul 17, 2025
f9923df
format.sh: support looping until it is happy
grahamc May 20, 2025
b19042b
Add sed
grahamc May 20, 2025
4bee881
Drop a ton of files that should just get formatted
grahamc Jul 17, 2025
9b8b5d8
Update clang-format with fixing namespace coments, and separate defin…
grahamc Jul 17, 2025
95d9c13
Apply clang-format universally.
xokdvium Jul 18, 2025
03b47a1
Update .git-blame-ignore-revs to ignore the mass reformatting
xokdvium Jul 18, 2025
0bc2b66
Merge pull request #13504 from NixOS/mergify/bp/2.30-maintenance/pr-1…
Mic92 Jul 18, 2025
460822d
treewide: Fix Meson CPU names for powerpc CPUs
OPNA2608 Jul 21, 2025
808af07
Merge pull request #13518 from NixOS/mergify/bp/2.30-maintenance/pr-1…
mergify[bot] Jul 21, 2025
f4d5bd9
Merge remote-tracking branch 'origin/2.30-maintenance' into sync-2.30
edolstra Jul 22, 2025
30bcfa5
meson: Correctly handle endianness for PowerPC CPU families
xokdvium Jul 22, 2025
8eaa838
Merge pull request #13529 from NixOS/mergify/bp/2.30-maintenance/pr-1…
mergify[bot] Jul 23, 2025
d6f8b9d
Fix nix_system_cpu on i686-linux
edolstra Jul 24, 2025
ffcf5b3
Merge pull request #13541 from NixOS/mergify/bp/2.30-maintenance/pr-1…
edolstra Jul 24, 2025
623f670
Merge tag '2.30.2' into sync-2.30
edolstra Jul 25, 2025
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
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.30.1
2.30.2
10 changes: 10 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,10 @@
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
4 changes: 3 additions & 1 deletion src/libstore/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ configdata_priv.set_quoted('PACKAGE_VERSION', meson.project_version())

configdata_priv.set_quoted('DETERMINATE_NIX_VERSION', fs.read('../../.version-determinate').strip())

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
2 changes: 2 additions & 0 deletions src/libstore/unix/build/darwin-derivation-builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ struct DarwinDerivationBuilder : DerivationBuilderImpl

if (getEnv("_NIX_TEST_NO_SANDBOX") != "1") {
Strings sandboxArgs;
sandboxArgs.push_back("_NIX_BUILD_TOP");
sandboxArgs.push_back(tmpDir);
sandboxArgs.push_back("_GLOBAL_TMP_DIR");
sandboxArgs.push_back(globalTmpDir);
if (drvOptions.allowLocalNetworking) {
Expand Down
6 changes: 4 additions & 2 deletions src/libstore/unix/build/sandbox-defaults.sb
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@ R""(
; Allow getpwuid.
(allow mach-lookup (global-name "com.apple.system.opendirectoryd.libinfo"))

; Access to /tmp.
; Access to /tmp and the build directory.
; The network-outbound/network-inbound ones are for unix domain sockets, which
; we allow access to in TMPDIR (but if we allow them more broadly, you could in
; theory escape the sandbox)
(allow file* process-exec network-outbound network-inbound
(literal "/tmp") (subpath TMPDIR))
(literal "/tmp")
(subpath TMPDIR)
(subpath (param "_NIX_BUILD_TOP")))

; Some packages like to read the system version.
(allow file-read*
Expand Down
8 changes: 8 additions & 0 deletions src/nix/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,14 @@ struct NixArgs : virtual MultiCommand, virtual MixCommonArgs, virtual RootArgs
lowdown. */
static void showHelp(std::vector<std::string> subcommand, NixArgs & toplevel)
{
// Check for aliases if subcommand has exactly one element
if (subcommand.size() == 1) {
auto alias = toplevel.aliases.find(subcommand[0]);
if (alias != toplevel.aliases.end()) {
subcommand = alias->second.replacement;
}
}

auto mdName = subcommand.empty() ? "nix" : fmt("nix3-%s", concatStringsSep("-", subcommand));

evalSettings.restrictEval = false;
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
4 changes: 4 additions & 0 deletions tests/functional/misc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
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 @@ -42,6 +42,7 @@ mkMesonDerivation (

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