Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
1e371c4
docs: fix duplicate anchor
pbsds May 16, 2025
354d4c4
export/meson: Don't require `-std=c++2a` for -c libraries in `.pc` files
xokdvium May 23, 2025
e04004e
nix flake archive: add --no-check-sigs option
zimbatm May 27, 2025
8f5e9b3
tests/functional: Add more language tests for builtins.match
xokdvium May 27, 2025
59da02d
Overriding gtest with gmock
fzakaria May 31, 2025
b320aa5
add documentation of tarball-ttl to nix-channel
donottellmetonottellyou May 31, 2025
ab3ad12
remove overly verbose mention of fetchTarball
donottellmetonottellyou Jun 1, 2025
aace3d9
add reference to the tarball-ttl documentation
donottellmetonottellyou Jun 1, 2025
556b71d
Modify docker.nix to use mapAttrsToList instead of mapAttrsFlatten
poperigby Jun 3, 2025
f97ff25
Fix broken link in configuration description
lucperkins Jun 11, 2025
ffe384b
docker: make sure `nix config check` works
drupol Jun 12, 2025
4f105e7
libexpr: Remove non-const overload of `listElems`
xokdvium Jun 12, 2025
cac6cfe
Fix a minor typo
jayeshv Jun 13, 2025
e52fe2c
libstore: fix race condition when creating state directories
wolfgangwalther Jun 17, 2025
66a5d4c
Update docs
synalice Jun 20, 2025
01963be
Fix link
egorkonovalov Jun 23, 2025
9af1782
libstore-tests: Don't leak memory in tests
xokdvium Jun 24, 2025
3971991
Merge of #13609
mergify[bot] Jul 30, 2025
f14f426
Merge of #13593
mergify[bot] Jul 30, 2025
d9f9862
Merge of #13647
mergify[bot] Jul 30, 2025
b5d34b1
Merge of #13634
mergify[bot] Jul 30, 2025
7454a59
Merge of #13611
mergify[bot] Jul 30, 2025
9f07946
Merge of #13645
mergify[bot] Jul 30, 2025
10a0413
Merge of #13625
mergify[bot] Jul 30, 2025
95e6751
Merge of #13617
mergify[bot] Jul 30, 2025
a59c53a
Merge of #13581
mergify[bot] Jul 30, 2025
8d7dd7e
Merge of #13649
mergify[bot] Jul 30, 2025
fcc6f1f
Merge of #13601
mergify[bot] Jul 30, 2025
efc1174
Merge of #13604
mergify[bot] Jul 30, 2025
5506f5e
Merge of #13632
mergify[bot] Jul 30, 2025
f281be0
Merge of #13627
mergify[bot] Jul 30, 2025
33caee1
Merge of #13636
mergify[bot] Jul 30, 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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,6 @@ result-*
.DS_Store

flake-regressions

# direnv
.direnv/
5 changes: 5 additions & 0 deletions doc/manual/source/command-ref/nix-channel.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ This command has the following operations:
Download the Nix expressions of subscribed channels and create a new generation.
Update all channels if none is specified, and only those included in *names* otherwise.

> **Note**
>
> Downloaded channel contents are cached.
> Use `--tarball-ttl` or the [`tarball-ttl` configuration option](@docroot@/command-ref/conf-file.md#conf-tarball-ttl) to change the validity period of cached downloads.

- `--list-generations`

Prints a list of all the current existing generations for the
Expand Down
2 changes: 1 addition & 1 deletion doc/manual/source/installation/installing-binary.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This performs the default type of installation for your platform:

We recommend the multi-user installation if it supports your platform and you can authenticate with `sudo`.

The installer can configured with various command line arguments and environment variables.
The installer can be configured with various command line arguments and environment variables.
To show available command line flags:

```console
Expand Down
6 changes: 3 additions & 3 deletions doc/manual/source/store/derivation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ There are two types of placeholder, corresponding to the two cases where this pr

> **Explanation**
>
> In general, we need to realise [realise] a [store object] in order to be sure to have a store object for it.
> In general, we need to [realise] a [store object] in order to be sure to have a store object for it.
> But for these two cases this is either impossible or impractical:
>
> - In the output case this is impossible:
Expand All @@ -189,7 +189,7 @@ This ensures that there is a canonical [store path] used to refer to the derivat
> **Note**
>
> Currently, the canonical encoding for every derivation is the "ATerm" format,
> but this is subject to change for types derivations which are not yet stable.
> but this is subject to change for the types of derivations which are not yet stable.

Regardless of the format used, when serializing a derivation to a store object, that store object will be content-addressed.

Expand Down Expand Up @@ -282,7 +282,7 @@ type DerivingPath = ConstantPath | OutputPath;

Under this extended model, `DerivingPath`s are thus inductively built up from a root `ConstantPath`, wrapped with zero or more outer `OutputPath`s.

### Encoding {#deriving-path-encoding}
### Encoding {#deriving-path-encoding-higher-order}

The encoding is adjusted in the natural way, encoding the `drv` field recursively using the same deriving path encoding.
The result of this is that it is possible to have a chain of `^<output-name>` at the end of the final string, as opposed to just a single one.
Expand Down
5 changes: 2 additions & 3 deletions docker.nix
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ let

nixConfContents =
(lib.concatStringsSep "\n" (
lib.mapAttrsFlatten (
lib.mapAttrsToList (
n: v:
let
vStr = if builtins.isList v then lib.concatStringsSep " " v else v;
Expand Down Expand Up @@ -280,7 +280,6 @@ let

ln -s ${profile} $out/nix/var/nix/profiles/default-1-link
ln -s /nix/var/nix/profiles/default-1-link $out/nix/var/nix/profiles/default
ln -s /nix/var/nix/profiles/default $out${userHome}/.nix-profile

ln -s ${channel} $out/nix/var/nix/profiles/per-user/${uname}/channels-1-link
ln -s /nix/var/nix/profiles/per-user/${uname}/channels-1-link $out/nix/var/nix/profiles/per-user/${uname}/channels
Expand Down Expand Up @@ -332,7 +331,7 @@ pkgs.dockerTools.buildLayeredImageWithNixDb {
'';

config = {
Cmd = [ "${userHome}/.nix-profile/bin/bash" ];
Cmd = [ (lib.getExe pkgs.bashInteractive) ];
User = "${toString uid}:${toString gid}";
Env = [
"USER=${uname}"
Expand Down
8 changes: 7 additions & 1 deletion nix-meson-build-support/export/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,18 @@ endforeach
requires_public += deps_public

extra_pkg_config_variables = get_variable('extra_pkg_config_variables', {})

extra_cflags = []
if not meson.project_name().endswith('-c')
extra_cflags += ['-std=c++2a']
endif

import('pkgconfig').generate(
this_library,
filebase : meson.project_name(),
name : 'Nix',
description : 'Nix Package Manager',
extra_cflags : ['-std=c++2a'],
extra_cflags : extra_cflags,
requires : requires_public,
requires_private : requires_private,
libraries_private : libraries_private,
Expand Down
4 changes: 2 additions & 2 deletions src/libexpr-tests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ deps_private += rapidcheck
gtest = dependency('gtest')
deps_private += gtest

gtest = dependency('gmock')
deps_private += gtest
gmock = dependency('gmock')
deps_private += gmock

configdata = configuration_data()
configdata.set_quoted('PACKAGE_VERSION', meson.project_version())
Expand Down
5 changes: 0 additions & 5 deletions src/libexpr/include/nix/expr/value.hh
Original file line number Diff line number Diff line change
Expand Up @@ -451,11 +451,6 @@ public:
return internalType == tList1 || internalType == tList2 || internalType == tListN;
}

Value * const * listElems()
{
return internalType == tList1 || internalType == tList2 ? payload.smallList : payload.bigList.elems;
}

std::span<Value * const> listItems() const
{
assert(isList());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ public:
Store * store;
std::string nixDir;
std::string nixStoreDir;
std::string nixStateDir;
std::string nixLogDir;

protected:
void init_local_store()
Expand All @@ -58,11 +60,13 @@ protected:
#endif

nixStoreDir = nixDir + "/my_nix_store";
nixStateDir = nixDir + "/my_state";
nixLogDir = nixDir + "/my_log";

// Options documented in `nix help-stores`
const char * p1[] = {"store", nixStoreDir.c_str()};
const char * p2[] = {"state", (new std::string(nixDir + "/my_state"))->c_str()};
const char * p3[] = {"log", (new std::string(nixDir + "/my_log"))->c_str()};
const char * p2[] = {"state", nixStateDir.c_str()};
const char * p3[] = {"log", nixLogDir.c_str()};

const char ** params[] = {p1, p2, p3, nullptr};

Expand Down
9 changes: 7 additions & 2 deletions src/libstore-tests/nix_api_store.cc
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,21 @@ TEST_F(nix_api_store_test, ReturnsValidStorePath)
ASSERT_NE(result, nullptr);
ASSERT_STREQ("name", result->path.name().data());
ASSERT_STREQ(PATH_SUFFIX.substr(1).c_str(), result->path.to_string().data());
nix_store_path_free(result);
}

TEST_F(nix_api_store_test, SetsLastErrCodeToNixOk)
{
nix_store_parse_path(ctx, store, (nixStoreDir + PATH_SUFFIX).c_str());
StorePath * path = nix_store_parse_path(ctx, store, (nixStoreDir + PATH_SUFFIX).c_str());
ASSERT_EQ(ctx->last_err_code, NIX_OK);
nix_store_path_free(path);
}

TEST_F(nix_api_store_test, DoesNotCrashWhenContextIsNull)
{
ASSERT_NO_THROW(nix_store_parse_path(ctx, store, (nixStoreDir + PATH_SUFFIX).c_str()));
StorePath * path = nullptr;
ASSERT_NO_THROW(path = nix_store_parse_path(ctx, store, (nixStoreDir + PATH_SUFFIX).c_str()));
nix_store_path_free(path);
}

TEST_F(nix_api_store_test, get_version)
Expand Down Expand Up @@ -119,6 +123,7 @@ TEST_F(nix_api_store_test, nix_store_is_valid_path_not_in_store)
{
StorePath * path = nix_store_parse_path(ctx, store, (nixStoreDir + PATH_SUFFIX).c_str());
ASSERT_EQ(false, nix_store_is_valid_path(ctx, store, path));
nix_store_path_free(path);
}

TEST_F(nix_api_store_test, nix_store_real_path)
Expand Down
2 changes: 1 addition & 1 deletion src/libstore/include/nix/store/globals.hh
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ public:

To build only on remote machines and disable local builds, set [`max-jobs`](#conf-max-jobs) to 0.

If you want the remote machines to use substituters, set [`builders-use-substitutes`](#conf-builders-use-substituters) to `true`.
If you want the remote machines to use substituters, set [`builders-use-substitutes`](#conf-builders-use-substitutes) to `true`.
)",
{},
false};
Expand Down
2 changes: 1 addition & 1 deletion src/libstore/local-store.cc
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ LocalStore::LocalStore(std::string_view scheme, PathView path, const Params & pa
Path gcRootsDir = stateDir + "/gcroots";
if (!pathExists(gcRootsDir)) {
createDirs(gcRootsDir);
createSymlink(profilesDir, gcRootsDir + "/profiles");
replaceSymlink(profilesDir, gcRootsDir + "/profiles");
}

for (auto & perUserDir : {profilesDir + "/per-user", gcRootsDir + "/per-user"}) {
Expand Down
12 changes: 11 additions & 1 deletion src/nix/flake.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1019,6 +1019,10 @@ struct CmdFlakeArchive : FlakeCommand, MixJSON, MixDryRun
{
std::string dstUri;

CheckSigsFlag checkSigs = CheckSigs;

SubstituteFlag substitute = NoSubstitute;

CmdFlakeArchive()
{
addFlag({
Expand All @@ -1027,6 +1031,11 @@ struct CmdFlakeArchive : FlakeCommand, MixJSON, MixDryRun
.labels = {"store-uri"},
.handler = {&dstUri},
});
addFlag({
.longName = "no-check-sigs",
.description = "Do not require that paths are signed by trusted keys.",
.handler = {&checkSigs, NoCheckSigs},
});
}

std::string description() override
Expand Down Expand Up @@ -1087,7 +1096,8 @@ struct CmdFlakeArchive : FlakeCommand, MixJSON, MixDryRun

if (!dryRun && !dstUri.empty()) {
ref<Store> dstStore = dstUri.empty() ? openStore() : openStore(dstUri);
copyPaths(*store, *dstStore, sources);

copyPaths(*store, *dstStore, sources, NoRepair, checkSigs, substitute);
}
}
};
Expand Down
1 change: 1 addition & 0 deletions tests/functional/lang/eval-okay-regex-match2.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[ null null null null null null null null null null [ ] [ ] null null null null [ "gnu" "m4/m4-1.4.19.tar.bz2" ] null [ "cpan" "src/5.0/perl-5.40.0.tar.gz" ] null null null [ "10" "" ] [ "11" "" ] [ "36" ] null [ "exec" ] [ ] null [ "26" ] null [ "26" ] null [ ] null null null null null [ "meson.patch?h=mingw-w64-xorgproto&id=7b817efc3144a50e6766817c4ca7242f8ce49307" ] null null [ "xmlto" ] null null [ "exec" ] null null [ ] [ ] null null [ "coconutbattery-4.0.2,152" ] [ "12" "0" ] [ "12" "8" ] [ "8" "9" "5" "30" ] [ "9" "7" "1" "26" ] null null [ ] [ ] null [ ] null [ ] null null [ null null "draupnir" ] [ ] [ ] null null [ null null "renderer" ] [ ] [ ] [ null ] null [ null ] null null null [ ] [ ] [ "p" ] [ "p" ] [ "systemtap" ] null [ ] null null [ ] null [ "20220722-71c783507536-b7eae18423ef" ] [ "20220726-bac6d66b5ca1-5b966f2f136c" ] [ ] [ "0.3.2308" ] null null null [ "17.0.14+" "7" ] null [ null ] [ null ] null null [ "21.0.7+" "6" ] null null [ ] [ ] [ "8u442" "06" ] [ ] [ "jna" "5.6.0" null null ] [ "jna" "5.6.0" null null ] [ ] [ ] null [ "2" ] null [ ] [ ] null null [ ] [ ] null null [ ] null [ ] [ "https://github.com/GRA0007/google-cloud-rs.git" null null null "4a2db92efd57a896e14d18877458c6ae43418aec" ] [ "https://github.com/GRA0007/google-cloud-rs.git" null null null "4a2db92efd57a896e14d18877458c6ae43418aec" ] null [ ] null [ "rejeep" "ansi.el" ] null [ "rejeep" "commander.el" ] null [ "2.2.4" "20231021.200112" "6" ] [ "2.2.4" "20231021.200112" "6" ] [ ] [ ] null null [ "" ] [ "" ".git" ] [ "" "\\.git" ] null null null [ "" "__pycache__" ] [ "" "__pycache__" ] null null null [ "" ] null null [ ] [ ] [ ] [ "8u442" "06" ] [ ] [ ] [ "simulator" ] null null null null null null [ "notify-send" ] [ "playlistmanager" ] [ ] [ ] null null null null [ "name" ] [ "name" ] null null null null [ "pypy" "27" ] [ "pypy" "310" ] [ "refs/heads/master" ] null [ "refs/heads/master" ] null null [ ] null null null null [ ] [ ] [ ] [ ] [ "b7eae18423ef" ] [ "20220726-bac6d66b5ca1-5b966f2f136c" ] null null [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ "" ] [ ] ]
Loading
Loading