diff --git a/.github/scripts/depexts/generate-actions.sh b/.github/scripts/depexts/generate-actions.sh index f5b043c747f..a0e34ad255b 100644 --- a/.github/scripts/depexts/generate-actions.sh +++ b/.github/scripts/depexts/generate-actions.sh @@ -170,6 +170,17 @@ cd /github/workspace #git clone https://github.com/ocaml/opam --single-branch --branch 2.2 --depth 1 local-opam #cd local-opam +EOF + +if [ $target == "nix" ]; then + cat >>$dir/entrypoint.sh << EOF +mkdir ~/.opam +echo 'global-variables: [("os-distribution", "nixos")]' >> ~/.opam/config + +EOF +fi + +cat >>$dir/entrypoint.sh << EOF /usr/bin/opam install . --deps eval \$(opam env) ./configure @@ -179,13 +190,7 @@ make EOF -if [ $target == "nix" ]; then - cat >>$dir/entrypoint.sh << EOF -mkdir ~/.opam -echo 'global-variables: [("os-distribution", "nixos")]' >> ~/.opam/config -EOF -fi # Test depexts