Commit fca2a886 authored by Doron Behar's avatar Doron Behar
Browse files

meshcentral: include optionalDependencies

parent 4105e8c7
Loading
Loading
Loading
Loading
+19038 −0

File added.

Preview size limit exceeded, changes collapsed.

+16 −1
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
  lib,
  buildNpmPackage,
  fetchFromGitHub,
  nodejs_22,
}:

buildNpmPackage (finalAttrs: {
@@ -15,7 +16,11 @@ buildNpmPackage (finalAttrs: {
    hash = "sha256-tXv4AWFLBoaHraSTYbEuNjdxnB3tYyAYq5xPe4jRcmw=";
  };

  npmDepsHash = "sha256-Etpf964Rb4fOty7RdyClQelyLMLVJhSQQB4fLgnf6AE=";
  npmDepsHash = "sha256-vWCd+7SnQCf6iBhQboqMKL7TQRPxvt4DOe9+XJ8XJ1Y=";
  # Using the npmDeps with a newer nodejs causes `npm ci` errors, also upstream
  # states they stick to the LTS version of nodejs:
  # https://meshcentral.com/docs/MeshCentral2InstallGuide.pdf
  nodejs = nodejs_22;

  patches = [
    ./fix-js-include-paths.patch
@@ -24,6 +29,16 @@ buildNpmPackage (finalAttrs: {
    # main file as a module, and thus nothing happens when it runs. We remove
    # this conditional since we never use this as a module.
    ./run.patch
    # Add `optionalDependencies` that are used during runtime, to
    # `package{,-lock}.json`. During a video meeting with upstream, they sort
    # of agreed to track these optionalDependencies from now on, but they are
    # still not sure about a few details regarding this. See:
    #
    # https://github.com/Ylianst/MeshCentral/pull/7672
    #
    # The above doesn't apply cleanly on 1.1.57, but hopefully it shouldn't be
    # too hard to regenerate it for the next version.
    ./optionalDependencies.patch
  ];

  dontNpmBuild = true;