Skip to content

Commit fbd862c

Browse files
committed
cli: Rename nix realisation to nix build-trace
The term "realisation" is heavily overused within nix and can be confusing to new users. Replace the "realisation" command with "build-trace", the new more specific phrase for CAFloating derivations. The CADerivations feature is currently experimental and this commit leaves an alias, so it is not expected to cause issues for many users.
1 parent b4f9970 commit fbd862c

7 files changed

Lines changed: 17 additions & 15 deletions

File tree

doc/manual/meson.build

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,8 @@ endforeach
258258

259259
nix3_manpages = [
260260
'nix3-build',
261+
'nix3-build-trace-info',
262+
'nix3-build-trace',
261263
'nix3-bundle',
262264
'nix3-config',
263265
'nix3-config-check',
@@ -314,8 +316,6 @@ nix3_manpages = [
314316
'nix3-profile-rollback',
315317
'nix3-profile-upgrade',
316318
'nix3-profile-wipe-history',
317-
'nix3-realisation-info',
318-
'nix3-realisation',
319319
'nix3-registry-add',
320320
'nix3-registry-list',
321321
'nix3-registry',
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ namespace nix {
88
struct CmdRealisation : NixMultiCommand
99
{
1010
CmdRealisation()
11-
: NixMultiCommand("realisation", RegisterCommand::getCommandsFor({"realisation"}))
11+
: NixMultiCommand("build-trace", RegisterCommand::getCommandsFor({"build-trace"}))
1212
{
1313
}
1414

1515
std::string description() override
1616
{
17-
return "manipulate a Nix realisation";
17+
return "manipulate a Nix build trace";
1818
}
1919

2020
Category category() override
@@ -23,19 +23,19 @@ struct CmdRealisation : NixMultiCommand
2323
}
2424
};
2525

26-
static auto rCmdRealisation = registerCommand<CmdRealisation>("realisation");
26+
static auto rCmdRealisation = registerCommand<CmdRealisation>("build-trace");
2727

2828
struct CmdRealisationInfo : BuiltPathsCommand, MixJSON
2929
{
3030
std::string description() override
3131
{
32-
return "query information about one or several realisations";
32+
return "query information about one or several build traces";
3333
}
3434

3535
std::string doc() override
3636
{
3737
return
38-
#include "realisation/info.md"
38+
#include "build-trace/info.md"
3939
;
4040
}
4141

@@ -77,6 +77,6 @@ struct CmdRealisationInfo : BuiltPathsCommand, MixJSON
7777
}
7878
};
7979

80-
static auto rCmdRealisationInfo = registerCommand2<CmdRealisationInfo>({"realisation", "info"});
80+
static auto rCmdBuildTraceInfo = registerCommand2<CmdRealisationInfo>({"build-trace", "info"});
8181

8282
} // namespace nix
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
R"MdBoundary(
22
# Description
33

4-
Display some information about the given realisation
4+
Display some information about the given build trace
55

66
# Examples
77

8-
Show some information about the realisation of the `hello` package:
8+
Show some information about the build trace of the `hello` package:
99

1010
```console
11-
$ nix realisation info nixpkgs#hello --json
11+
$ nix build-trace info nixpkgs#hello --json
1212
[{"id":"sha256:3d382378a00588e064ee30be96dd0fa7e7df7cf3fbcace85a0e7b7dada1eef25!out","outPath":"fd3m7xawvrqcg98kgz5hc2vk3x9q0lh7-hello"}]
1313
```
1414

src/nix/main.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ struct NixArgs : virtual MultiCommand, virtual MixCommonArgs, virtual RootArgs
161161
{"make-content-addressable", {AliasStatus::Deprecated, {"store", "make-content-addressed"}}},
162162
{"optimise-store", {AliasStatus::Deprecated, {"store", "optimise"}}},
163163
{"ping-store", {AliasStatus::Deprecated, {"store", "info"}}},
164+
{"realisation", {AliasStatus::Deprecated, {"build-trace"}}},
164165
{"sign-paths", {AliasStatus::Deprecated, {"store", "sign"}}},
165166
{"shell", {AliasStatus::AcceptedShorthand, {"env", "shell"}}},
166167
{"show-derivation", {AliasStatus::Deprecated, {"derivation", "show"}}},

src/nix/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ subdir('nix-meson-build-support/generate-header')
7777
nix_sources = [ config_priv_h ] + files(
7878
'add-to-store.cc',
7979
'app.cc',
80+
'build-trace.cc',
8081
'build.cc',
8182
'bundle.cc',
8283
'cat.cc',
@@ -108,7 +109,6 @@ nix_sources = [ config_priv_h ] + files(
108109
'path-info.cc',
109110
'prefetch.cc',
110111
'profile.cc',
111-
'realisation.cc',
112112
'registry.cc',
113113
'repl.cc',
114114
'run.cc',

tests/functional/ca/substitute.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ clearStore
2626
# this. Force the use of small-step resolutions only to allow not
2727
# mentioning it explicitly again. (#11896, #11928).
2828
buildDrvs --substitute --substituters "$REMOTE_STORE" --no-require-sigs -j0 transitivelyDependentCA dependentCA
29-
# Check that the thing we’ve just substituted has its realisation stored
30-
nix realisation info --file ./content-addressed.nix transitivelyDependentCA
29+
# Check that the thing we’ve just substituted has its build trace stored
30+
nix build-trace info --file ./content-addressed.nix transitivelyDependentCA
3131
# Check that its dependencies have it too
32+
# Use the old command to make sure that the alias works
3233
nix realisation info --file ./content-addressed.nix dependentCA
3334
# nix realisation info --file ./content-addressed.nix rootCA --outputs out
3435

tests/functional/completions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ throw "error"
3636
EOF
3737

3838
# Test the completion of a subcommand
39-
[[ "$(NIX_GET_COMPLETIONS=1 nix buil)" == $'normal\nbuild\t' ]]
39+
[[ "$(NIX_GET_COMPLETIONS=1 nix buil)" == $'normal\nbuild\t\nbuild-trace\t' ]]
4040
[[ "$(NIX_GET_COMPLETIONS=2 nix flake metad)" == $'normal\nmetadata\t' ]]
4141

4242
# Filename completion

0 commit comments

Comments
 (0)