From f6ee8eeda800bf2fb7d3d69c7c918217bb012215 Mon Sep 17 00:00:00 2001 From: Artemis Tosini Date: Sat, 1 Jun 2024 22:49:50 +0000 Subject: [PATCH] treewide: s/nix_installer/lix_installer/ where needed Not all references to the crate name were caught when it was changed. Some tests rely on importing from `lix_installer` and filter directives for the logs vary based on crate name. Change-Id: I29acde8b96c823332a740dc69ef1847fdd89d967 --- nix/tests/container-test/default/Dockerfile | 2 +- nix/tests/vm-test/default.nix | 6 +++--- src/action/mod.rs | 2 +- src/lib.rs | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/nix/tests/container-test/default/Dockerfile b/nix/tests/container-test/default/Dockerfile index 97b5228..cf661d6 100644 --- a/nix/tests/container-test/default/Dockerfile +++ b/nix/tests/container-test/default/Dockerfile @@ -3,7 +3,7 @@ COPY lix-installer /lix-installer RUN chmod +x /lix-installer COPY binary-tarball /binary-tarball RUN mv /binary-tarball/nix-*.tar.xz nix.tar.xz -RUN /nix-installer/bin/lix-installer install linux --logger pretty --log-directive nix_installer=debug --nix-package-url file:///nix.tar.xz --init none --extra-conf "sandbox = false" --no-confirm -vvv +RUN /nix-installer/bin/lix-installer install linux --logger pretty --log-directive lix_installer=debug --nix-package-url file:///nix.tar.xz --init none --extra-conf "sandbox = false" --no-confirm -vvv ENV PATH="${PATH}:/nix/var/nix/profiles/default/bin" RUN nix-build --no-substitute -E 'derivation { name = "foo"; system = "x86_64-linux"; builder = "/bin/sh"; args = ["-c" "echo foobar > $out"]; }' RUN /nix/lix-installer uninstall --no-confirm \ No newline at end of file diff --git a/nix/tests/vm-test/default.nix b/nix/tests/vm-test/default.nix index 63eb2a5..5afe444 100644 --- a/nix/tests/vm-test/default.nix +++ b/nix/tests/vm-test/default.nix @@ -4,7 +4,7 @@ let nix-installer-install = '' NIX_PATH=$(readlink -f nix.tar.xz) - RUST_BACKTRACE="full" ./nix-installer install --nix-package-url "file://$NIX_PATH" --no-confirm --logger pretty --log-directive nix_installer=info + RUST_BACKTRACE="full" ./nix-installer install --nix-package-url "file://$NIX_PATH" --no-confirm --logger pretty --log-directive lix_installer=info ''; nix-installer-install-quiet = '' NIX_PATH=$(readlink -f nix.tar.xz) @@ -135,7 +135,7 @@ let install-no-start-daemon = { install = '' NIX_PATH=$(readlink -f nix.tar.xz) - RUST_BACKTRACE="full" ./nix-installer install linux --nix-package-url "file://$NIX_PATH" --no-confirm --logger pretty --log-directive nix_installer=info --no-start-daemon + RUST_BACKTRACE="full" ./nix-installer install linux --nix-package-url "file://$NIX_PATH" --no-confirm --logger pretty --log-directive lix_installer=info --no-start-daemon ''; check = '' set -ex @@ -162,7 +162,7 @@ let install-daemonless = { install = '' NIX_PATH=$(readlink -f nix.tar.xz) - RUST_BACKTRACE="full" ./nix-installer install linux --nix-package-url "file://$NIX_PATH" --no-confirm --logger pretty --log-directive nix_installer=info --init none + RUST_BACKTRACE="full" ./nix-installer install linux --nix-package-url "file://$NIX_PATH" --no-confirm --logger pretty --log-directive lix_installer=info --init none ''; check = '' set -ex diff --git a/src/action/mod.rs b/src/action/mod.rs index d120765..11ddc53 100644 --- a/src/action/mod.rs +++ b/src/action/mod.rs @@ -68,7 +68,7 @@ impl MyAction { #[async_trait::async_trait] #[typetag::serde(name = "my_action")] impl Action for MyAction { - fn action_tag() -> nix_installer::action::ActionTag { + fn action_tag() -> lix_installer::action::ActionTag { "my_action".into() } fn tracing_synopsis(&self) -> String { diff --git a/src/lib.rs b/src/lib.rs index f3c3e2a..21d5015 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -42,9 +42,9 @@ use lix_installer::{InstallPlan, planner::Planner}; # async fn chosen_planner_install() -> color_eyre::Result<()> { #[cfg(target_os = "linux")] -let planner = nix_installer::planner::steam_deck::SteamDeck::default().await?; +let planner = lix_installer::planner::steam_deck::SteamDeck::default().await?; #[cfg(target_os = "macos")] -let planner = nix_installer::planner::macos::Macos::default().await?; +let planner = lix_installer::planner::macos::Macos::default().await?; // Or call `crate::planner::BuiltinPlanner::default()` // Match on the result to customize.