Commit a6eaeab5 authored by qzylinra's avatar qzylinra
Browse files

melos: use workspace

parent a8e88a1b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
diff --git a/bin/melos.dart b/bin/melos.dart
index 0db7013..218276f 100644
--- a/bin/melos.dart
+++ b/bin/melos.dart
--- a/packages/melos/bin/melos.dart
+++ b/packages/melos/bin/melos.dart
@@ -1,11 +1,37 @@
+import 'dart:io';
 import 'package:cli_launcher/cli_launcher.dart';
+3 −5
Original line number Diff line number Diff line
@@ -16,8 +16,6 @@ buildDartApplication {
  pname = "melos";
  inherit version src;

  sourceRoot = "${src.name}/packages/melos";

  patches = [
    # This patch (created a melos 6.1.0) modify the method melos use to find path to the root of the projects.
    # It is needed because when melos is in the nixstore, it break it and fail to find the projects root with melos.yaml
@@ -28,12 +26,12 @@ buildDartApplication {

  # hard code the path to the melos templates
  preBuild = ''
    substituteInPlace lib/src/common/utils.dart \
    substituteInPlace packages/melos/lib/src/common/utils.dart \
      --replace-fail "final melosPackageFileUri = await Isolate.resolvePackageUri(melosPackageUri);" "return \"$out\";"
    substituteInPlace lib/src/common/utils.dart \
    substituteInPlace packages/melos/lib/src/common/utils.dart \
      --replace-fail "return p.normalize('\''${melosPackageFileUri!.toFilePath()}/../..');" " "
    mkdir --parents $out
    cp --recursive templates $out/
    cp --recursive packages/melos/templates $out/
  '';

  meta = {
+0 −9
Original line number Diff line number Diff line
@@ -709,15 +709,6 @@
      },
      "source": "hosted",
      "version": "2.2.2"
    },
    "conventional_commit": {
      "dependency": "direct main",
      "description": {
        "path": "../conventional_commit",
        "relative": true
      },
      "source": "path",
      "version": "0.6.1"
    }
  },
  "sdks": {