Skip to content

Use nix --accept-flake-config option rather than yes | in CI tests #1626

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ steps:

- label: 'Check that the haskell.nix roots do not require IFDs'
command:
- yes | nix build .#roots.x86_64-linux --option allow-import-from-derivation false
- nix build .#roots.x86_64-linux --accept-flake-config --option allow-import-from-derivation false
agents:
system: x86_64-linux

Expand Down
4 changes: 3 additions & 1 deletion scripts/update-external.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,7 @@ in

cd ..

yes | nix --experimental-features 'nix-command flakes' flake lock --update-input ${name}
nix flack lock --accept-flake-config \
--experimental-features 'nix-command flakes' \
--update-input ${name}
''
10 changes: 0 additions & 10 deletions test/nix.conf

This file was deleted.

11 changes: 1 addition & 10 deletions test/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,7 @@ printf "*** Cleaning package build directories..." >& 2
rm -rvf */cabal.project.local */.ghc.environment* */dist */dist-newstyle */.stack-work
echo >& 2

# This was needed is first place to make hix template / flake devShell examples
# not require interactive user confirmation. Because the IOG nix cache settings
# are defined in the `nixConfig` flake attribute.
if [ ! -z ${CI+x} ]; then
printf "*** Set custom nix.conf for CI ..." >& 2
export XDG_CONFIG_HOME=$HOME/.config
mkdir -p $XDG_CONFIG_HOME/nix
cp ./nix.conf $XDG_CONFIG_HOME/nix
echo >& 2
fi
alias nix="nix --accept-flake-config"

printf "*** Running the nix-build tests...\n" >& 2
nix build $NIX_BUILD_ARGS \
Expand Down