mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-12-05 04:10:19 +00:00
meshcentral: 1.2.0 -> 1.3.1 (#587256)
This commit is contained in:
10
pkgs/by-name/me/meshcentral/fix-module-version-check.patch
Normal file
10
pkgs/by-name/me/meshcentral/fix-module-version-check.patch
Normal file
@@ -0,0 +1,10 @@
|
||||
--- a/meshcentral.js
|
||||
+++ b/meshcentral.js
|
||||
@@ -4280,6 +4280,7 @@
|
||||
if ((__dirname.endsWith('/node_modules/meshcentral')) || (__dirname.endsWith('\\node_modules\\meshcentral')) || (__dirname.endsWith('/node_modules/meshcentral/')) || (__dirname.endsWith('\\node_modules\\meshcentral\\'))) { rootPath = require('path').join(__dirname, '../..'); }
|
||||
var pkgPath = require('path').join(rootPath, 'node_modules', moduleName, 'package.json');
|
||||
if (require('fs').existsSync(pkgPath)) { modulePath = pkgPath; }
|
||||
+ if (modulePath == null) { pkgPath = require('path').join(__dirname, 'node_modules', moduleName, 'package.json'); if (require('fs').existsSync(pkgPath)) { modulePath = pkgPath; } }
|
||||
} else { throw new Error(); }
|
||||
}
|
||||
// If the module is not installed, but we get the ERR_PACKAGE_PATH_NOT_EXPORTED error, try a second way.
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,16 +7,16 @@
|
||||
|
||||
buildNpmPackage (finalAttrs: {
|
||||
pname = "meshcentral";
|
||||
version = "1.2.0";
|
||||
version = "1.3.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Ylianst";
|
||||
repo = "MeshCentral";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-a+vqNjmKP866O2t+UsedpgYtWFbjeoYNtuCziAa436A=";
|
||||
hash = "sha256-nDBgXSWrkMhfnGgpWJQyaUCz2RuF1P7U1I8A4qTIYh0=";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-ZnSpqw4pn6OI8Gh9qLseTLH24jtj1zPGfHiMlUX+l/s=";
|
||||
npmDepsHash = "sha256-7AajJbMRirj1diuSIHC8MgYMChsZfvq1t+IBk0y/46Y=";
|
||||
# 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
|
||||
@@ -29,6 +29,12 @@ 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
|
||||
# Modules with a pinned version (e.g. `otplib`, `ua-client-hints-js`) that
|
||||
# have `exports` in their `package.json` are looked up in `$out/lib/node_modules`
|
||||
# by the fallback check, but we install them into
|
||||
# `$out/lib/node_modules/meshcentral/node_modules`. Without this MeshCentral
|
||||
# thinks they are missing and tries to run `npm install` at runtime.
|
||||
./fix-module-version-check.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
|
||||
@@ -46,7 +52,8 @@ buildNpmPackage (finalAttrs: {
|
||||
meta = {
|
||||
description = "Computer management web app";
|
||||
homepage = "https://meshcentral.com/";
|
||||
maintainers = [ ];
|
||||
changelog = "https://github.com/Ylianst/MeshCentral/releases/tag/${finalAttrs.version}";
|
||||
maintainers = with lib.maintainers; [ samirbgno ];
|
||||
license = lib.licenses.asl20;
|
||||
mainProgram = "meshcentral";
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user