Skip to content

Commit 92f2341

Browse files
committed
update
1 parent bf21fec commit 92f2341

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

.github/scripts/depexts/generate-actions.sh

+9-11
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,15 @@ ENV OPAMCONFIRMLEVEL=unsafe-yes
124124
ENV OPAMPRECISETRACKING=1
125125
COPY opam /usr/bin/opam
126126
RUN echo 'default-invariant: [ $OCAML_INVARIANT ]' > /opam/opamrc
127+
EOF
128+
129+
if [ $target == "nix" ]; then
130+
cat >>$dir/Dockerfile << EOF
131+
RUN echo 'global-variables: [[os-distribution ["nixos"] "nixos"]]' > /opam/opamrc
132+
EOF
133+
fi
134+
135+
cat >>$dir/Dockerfile << EOF
127136
RUN /usr/bin/opam init --no-setup --disable-sandboxing --bare --config /opam/opamrc git+$OPAM_REPO#$OPAM_REPO_SHA
128137
RUN echo 'archive-mirrors: "https://opam.ocaml.org/cache"' >> \$OPAMROOT/config
129138
RUN /usr/bin/opam switch create this-opam --formula='$OCAML_INVARIANT'
@@ -170,17 +179,6 @@ cd /github/workspace
170179
#git clone https://github.com/ocaml/opam --single-branch --branch 2.2 --depth 1 local-opam
171180
#cd local-opam
172181
173-
EOF
174-
175-
if [ $target == "nix" ]; then
176-
cat >>$dir/entrypoint.sh << EOF
177-
mkdir ~/.opam
178-
echo 'global-variables: [("os-distribution", "nixos")]' >> ~/.opam/config
179-
180-
EOF
181-
fi
182-
183-
cat >>$dir/entrypoint.sh << EOF
184182
/usr/bin/opam install . --deps
185183
eval \$(opam env)
186184
./configure

0 commit comments

Comments
 (0)