Merge pull request #41461 from xplat/fix-opam-master

fix opam tool support
This commit is contained in:
John Ericson 2018-06-08 15:54:45 -04:00 committed by GitHub
commit ba210568a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,8 +71,12 @@ in stdenv.mkDerivation rec {
# Dirty, but apparently ocp-build requires a TERM
makeFlags = ["TERM=screen"];
# change argv0 to "opam" as a workaround for
# https://github.com/ocaml/opam/issues/2142
postInstall = ''
wrapProgram $out/bin/opam \
mv $out/bin/opam $out/bin/.opam-wrapped
makeWrapper $out/bin/.opam-wrapped $out/bin/opam \
--argv0 "opam" \
--suffix PATH : ${aspcud}/bin:${unzip}/bin:${curl}/bin
'';