From 9622cf4204802424434e566b560be5cc304107ff Mon Sep 17 00:00:00 2001 From: maddeleine <59030281+maddeleine@users.noreply.github.com> Date: Tue, 10 Dec 2024 12:37:47 -0800 Subject: [PATCH] (chore): Installs Nix in AL2023 Buildspec (#4934) --- codebuild/spec/buildspec_al2023_ktls.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/codebuild/spec/buildspec_al2023_ktls.yml b/codebuild/spec/buildspec_al2023_ktls.yml index 6b95d5df73b..f0b19605caf 100644 --- a/codebuild/spec/buildspec_al2023_ktls.yml +++ b/codebuild/spec/buildspec_al2023_ktls.yml @@ -11,8 +11,10 @@ phases: - yum update -y; yum upgrade -y pre_build: commands: - # Nix is installed, but intentionally not setup for root, fix that - - cp -aR /home/nix/.nix-profile ~/; chown -R root /root/.nix-profile; export PATH=$HOME/.nix-profile/bin:$PATH + # (Re)Install nix + - sh <(curl -L https://nixos.org/nix/install) --no-daemon + # Make sure nix exists in the PATH + - export PATH=$HOME/.nix-profile/bin:$PATH # Turn on flakes - mkdir -p ~/.config/nix; echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf # Populate the store from the nix cache