Skip to content

Commit

Permalink
try and fix docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanGibb committed Jul 17, 2024
1 parent fb8ff59 commit 56f7451
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/scripts/depexts/generate-actions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ EOF
cat >$dir/Dockerfile << EOF
FROM nixos/nix
RUN nix-channel --update
RUN nix-env -i gnum4 git rsync patch gnutar bzip2 gnumake wget ocamlPackages.ocaml ocamlPackages.ocaml-compiler-libs
EOF
esac

Expand All @@ -130,9 +129,17 @@ RUN /usr/bin/opam switch create this-opam --formula='$OCAML_INVARIANT'
RUN /usr/bin/opam install opam-core opam-state opam-solver opam-repository opam-format opam-client --deps
RUN /usr/bin/opam clean -as --logs
COPY entrypoint.sh /opam/entrypoint.sh
ENTRYPOINT ["/opam/entrypoint.sh"]
EOF

if [ "$target" != "nix" ]; then
cat >>$dir/Dockerfile << EOF
ENTRYPOINT ["/opam/entrypoint.sh"]
EOF
else
cat >>$dir/Dockerfile << EOF
ENTRYPOINT ["nix-shell", "-p", "gnum4", "git", "rsync", "patch", "gnutar", "bzip2", "gnumake", "wget", "ocamlPackages.ocaml", "ocamlPackages.ocaml-compiler-libs", "--run", "/opam/entrypoint.sh"]
EOF
fi

### Generate the entrypoint
cat >$dir/entrypoint.sh << EOF
Expand Down

0 comments on commit 56f7451

Please sign in to comment.