Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanGibb committed Jul 17, 2024
1 parent bf21fec commit 92f2341
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions .github/scripts/depexts/generate-actions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,15 @@ ENV OPAMCONFIRMLEVEL=unsafe-yes
ENV OPAMPRECISETRACKING=1
COPY opam /usr/bin/opam
RUN echo 'default-invariant: [ $OCAML_INVARIANT ]' > /opam/opamrc
EOF

if [ $target == "nix" ]; then
cat >>$dir/Dockerfile << EOF
RUN echo 'global-variables: [[os-distribution ["nixos"] "nixos"]]' > /opam/opamrc
EOF
fi

cat >>$dir/Dockerfile << EOF
RUN /usr/bin/opam init --no-setup --disable-sandboxing --bare --config /opam/opamrc git+$OPAM_REPO#$OPAM_REPO_SHA
RUN echo 'archive-mirrors: "https://opam.ocaml.org/cache"' >> \$OPAMROOT/config
RUN /usr/bin/opam switch create this-opam --formula='$OCAML_INVARIANT'
Expand Down Expand Up @@ -170,17 +179,6 @@ 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
Expand Down

0 comments on commit 92f2341

Please sign in to comment.