From b63d4a0c622fa556695e7666b9b3bde920904920 Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Tue, 10 Sep 2024 13:13:19 -0700 Subject: Remove static initializers for `RegisterLegacyCommand` This moves the "legacy"/"nix2" commands under a new `src/legacy/` directory, instead of being scattered around in a bunch of different directories. A new `liblegacy` build target is defined, and the `nix` binary is linked against it. Then, `RegisterLegacyCommand` is replaced with `LegacyCommand::add` calls in functions like `registerNixCollectGarbage()`. These registration functions are called explicitly in `src/nix/main.cc`. See: https://git.lix.systems/lix-project/lix/issues/359 Change-Id: Id450ffc3f793374907599cfcc121863b792aac1a --- tests/functional/restricted.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/functional') diff --git a/tests/functional/restricted.sh b/tests/functional/restricted.sh index 450674bd6..dd6386278 100644 --- a/tests/functional/restricted.sh +++ b/tests/functional/restricted.sh @@ -11,8 +11,8 @@ nix-instantiate --restrict-eval ./simple.nix -I src1=simple.nix -I src2=config.n (! nix-instantiate --restrict-eval --eval -E 'builtins.readFile ./simple.nix') nix-instantiate --restrict-eval --eval -E 'builtins.readFile ./simple.nix' -I src=../.. -(! nix-instantiate --restrict-eval --eval -E 'builtins.readDir ../../src/nix-channel') -nix-instantiate --restrict-eval --eval -E 'builtins.readDir ../../src/nix-channel' -I src=../../src +(! nix-instantiate --restrict-eval --eval -E 'builtins.readDir ../../src/legacy') +nix-instantiate --restrict-eval --eval -E 'builtins.readDir ../../src/legacy' -I src=../../src (! nix-instantiate --restrict-eval --eval -E 'let __nixPath = [ { prefix = "foo"; path = ./.; } ]; in ') nix-instantiate --restrict-eval --eval -E 'let __nixPath = [ { prefix = "foo"; path = ./.; } ]; in ' -I src=. -- cgit v1.2.3