Commit 92f2341 1 parent bf21fec commit 92f2341 Copy full SHA for 92f2341
File tree 1 file changed +9
-11
lines changed
1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -124,6 +124,15 @@ ENV OPAMCONFIRMLEVEL=unsafe-yes
124
124
ENV OPAMPRECISETRACKING=1
125
125
COPY opam /usr/bin/opam
126
126
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
127
136
RUN /usr/bin/opam init --no-setup --disable-sandboxing --bare --config /opam/opamrc git+$OPAM_REPO #$OPAM_REPO_SHA
128
137
RUN echo 'archive-mirrors: "https://opam.ocaml.org/cache"' >> \$ OPAMROOT/config
129
138
RUN /usr/bin/opam switch create this-opam --formula='$OCAML_INVARIANT '
@@ -170,17 +179,6 @@ cd /github/workspace
170
179
#git clone https://github.com/ocaml/opam --single-branch --branch 2.2 --depth 1 local-opam
171
180
#cd local-opam
172
181
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
184
182
/usr/bin/opam install . --deps
185
183
eval \$ (opam env)
186
184
./configure
You can’t perform that action at this time.
0 commit comments