Unverified Commit cff7b91d authored by Mario Rodas's avatar Mario Rodas Committed by GitHub
Browse files

Merge pull request #185345 from ylh/patch-opam-internal-solver

opam: remove aspcud from runtime
parents 568b0838 fd04240f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
{ stdenv, lib, fetchurl, makeWrapper, getconf,
  ocaml, unzip, ncurses, curl, aspcud, bubblewrap
  ocaml, unzip, ncurses, curl, bubblewrap
}:

assert lib.versionAtLeast ocaml.version "4.02.3";
@@ -119,7 +119,7 @@ in stdenv.mkDerivation {
    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:${lib.optionalString stdenv.isLinux "${bubblewrap}/bin:"}${getconf}/bin \
      --suffix PATH : ${unzip}/bin:${curl}/bin:${lib.optionalString stdenv.isLinux "${bubblewrap}/bin:"}${getconf}/bin \
      --set OPAM_USER_PATH_RO /run/current-system/sw/bin:/nix/
    $out/bin/opam-installer --prefix=$installer opam-installer.install
  '';
+3 −3
Original line number Diff line number Diff line
@@ -21,12 +21,12 @@ chomp $OPAM_RELEASE_SHA256;

my $OPAM_BASE_URL = "https://raw.githubusercontent.com/$OPAM_GITHUB_REPO/$OPAM_TAG";
my $OPAM_OPAM = `curl -L --url \Q$OPAM_BASE_URL\E/opam-devel.opam`;
my($OCAML_MIN_VERSION) = $OPAM_OPAM =~ /^  "ocaml" {>= "(.*)"}$/m
my($OCAML_MIN_VERSION) = $OPAM_OPAM =~ /^  "ocaml" \{>= "(.*)"}$/m
  or die "could not parse ocaml version bound\n";

print <<"EOF";
{ stdenv, lib, fetchurl, makeWrapper, getconf,
  ocaml, unzip, ncurses, curl, aspcud, bubblewrap
  ocaml, unzip, ncurses, curl, bubblewrap
}:

assert lib.versionAtLeast ocaml.version "$OCAML_MIN_VERSION";
@@ -114,7 +114,7 @@ print <<'EOF';
    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:${lib.optionalString stdenv.isLinux "${bubblewrap}/bin:"}${getconf}/bin \
      --suffix PATH : ${unzip}/bin:${curl}/bin:${lib.optionalString stdenv.isLinux "${bubblewrap}/bin:"}${getconf}/bin \
      --set OPAM_USER_PATH_RO /run/current-system/sw/bin:/nix/
    $out/bin/opam-installer --prefix=$installer opam-installer.install
  '';