push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
{
lib,
fetchzip,
fetchYarnDeps,
yarn2nix-moretea,
nodejs_20,
dos2unix,
}:
yarn2nix-moretea.mkYarnPackage {
version = "1.1.51";
src = fetchzip {
url = "https://registry.npmjs.org/meshcentral/-/meshcentral-1.1.51.tgz";
sha256 = "1l3x1rhcw38pg0rh27qyfg2dm5biwnyzicdd6l07c3km4x6xi5pr";
};
patches = [
./fix-js-include-paths.patch
];
packageJSON = ./package.json;
yarnLock = ./yarn.lock;
offlineCache = fetchYarnDeps {
yarnLock = ./yarn.lock;
hash = "sha256-jmsRlHJgSrUtXwRcfX+tMH4SmrKVtD7gEK1+oW5mYIs=";
};
# Tarball has CRLF line endings. This makes patching difficult, so let's convert them.
nativeBuildInputs = [ dos2unix ];
prePatch = ''
find . -name '*.js' -exec dos2unix {} +
ln -snf meshcentral.js bin/meshcentral
'';
preFixup = ''
mkdir -p $out/bin
chmod a+x $out/libexec/meshcentral/deps/meshcentral/meshcentral.js
sed -i '1i#!${nodejs_20}/bin/node' $out/libexec/meshcentral/deps/meshcentral/meshcentral.js
ln -s $out/libexec/meshcentral/deps/meshcentral/meshcentral.js $out/bin/meshcentral
'';
publishBinsFor = [ ];
passthru.updateScript = ./update.sh;
meta = with lib; {
description = "Computer management web app";
homepage = "https://meshcentral.com/";
maintainers = with maintainers; [ ma27 ];
license = licenses.asl20;
mainProgram = "meshcentral";
};
}

View File

@@ -0,0 +1,31 @@
diff --git a/pkcs7-modified.js b/pkcs7-modified.js
index 661904a6..932a41ad 100644
--- a/pkcs7-modified.js
+++ b/pkcs7-modified.js
@@ -31,16 +31,16 @@ try {
} catch (ex) { }
if (forge == null) {
- forge = require('./node_modules/node-forge/lib/forge');
- require('./node_modules/node-forge/lib/aes');
- require('./node_modules/node-forge/lib/asn1');
- require('./node_modules/node-forge/lib/des');
- require('./node_modules/node-forge/lib/oids');
- require('./node_modules/node-forge/lib/pem');
- require('./node_modules/node-forge/lib/pkcs7asn1');
- require('./node_modules/node-forge/lib/random');
- require('./node_modules/node-forge/lib/util');
- require('./node_modules/node-forge/lib/x509');
+ forge = require('node-forge/lib/forge');
+ require('node-forge/lib/aes');
+ require('node-forge/lib/asn1');
+ require('node-forge/lib/des');
+ require('node-forge/lib/oids');
+ require('node-forge/lib/pem');
+ require('node-forge/lib/pkcs7asn1');
+ require('node-forge/lib/random');
+ require('node-forge/lib/util');
+ require('node-forge/lib/x509');
}
// shortcut for ASN.1 API

View File

@@ -0,0 +1,142 @@
{
"name": "meshcentral",
"version": "1.1.51",
"keywords": [
"Remote Device Management",
"Remote Device Monitoring",
"Remote Desktop",
"Remote Terminal",
"Remote File Access",
"KVM",
"2FA",
"Two-Factor Authentication",
"Intel Active Management Technology",
"Intel AMT"
],
"homepage": "https://meshcentral.com",
"description": "Web based remote computer management server",
"author": "Ylian Saint-Hilaire <ylianst@gmail.com>",
"main": "meshcentral.js",
"bin": {
"meshcentral": "bin/meshcentral"
},
"license": "Apache-2.0",
"files": [
"*.js",
"amt",
"bin",
"rdp",
"views",
"emails",
"agents",
"public",
"translate",
"readme.txt",
"license.txt",
"sample-config.json",
"sample-config-advanced.json"
],
"dependencies": {
"@seald-io/nedb": "4.0.4",
"archiver": "7.0.1",
"body-parser": "1.20.3",
"cbor": "5.2.0",
"compression": "1.8.1",
"cookie-session": "2.1.1",
"express": "4.21.2",
"express-handlebars": "7.1.3",
"express-ws": "5.0.2",
"ipcheck": "0.1.0",
"minimist": "1.2.8",
"multiparty": "4.2.3",
"node-forge": "1.3.1",
"ua-client-hints-js": "0.1.2",
"ua-parser-js": "1.0.40",
"ws": "8.18.0",
"yauzl": "2.10.0"
},
"engines": {
"node": ">=16.0.0"
},
"repository": {
"type": "git",
"url": "https://github.com/Ylianst/MeshCentral.git"
},
"readme": "readme.md",
"optionalDependencies": {
"passport": "*",
"connect-flash": "*",
"passport-twitter": "*",
"passport-google-oauth20": "*",
"passport-github2": "*",
"passport-azure-oauth2": "*",
"jwt-simple": "*",
"openid-client": "5.7.1",
"passport-saml": "*",
"@duosecurity/duo_universal": "2.1.0",
"archiver": "7.0.1",
"body-parser": "1.20.3",
"cbor": "5.2.0",
"compression": "1.8.1",
"cookie-session": "2.1.1",
"express": "4.21.2",
"express-handlebars": "7.1.3",
"express-ws": "5.0.2",
"ipcheck": "0.1.0",
"minimist": "1.2.8",
"multiparty": "4.2.3",
"@seald-io/nedb": "*",
"node-forge": "1.3.1",
"ua-parser-js": "1.0.40",
"ua-client-hints-js": "0.1.2",
"ws": "8.18.0",
"yauzl": "2.10.0",
"node-windows": "0.1.14",
"loadavg-windows": "1.1.1",
"node-sspi": "0.2.10",
"ldapauth-fork": "5.0.5",
"ssh2": "1.16.0",
"svg-captcha": "1.4.0",
"image-size": "2.0.2",
"acme-client": "4.2.5",
"aedes": "0.39.0",
"mysql2": "3.11.4",
"@mysql/xdevapi": "8.0.33",
"mongodb": "4.17.2",
"pg": "8.14.1",
"mariadb": "3.4.0",
"acebase": "1.29.5",
"sqlite3": "5.1.7",
"node-vault": "0.10.2",
"https-proxy-agent": "7.0.2",
"mongojs": "3.1.0",
"nodemailer": "6.10.1",
"@sendgrid/mail": "*",
"jsdom": "22.1.0",
"esprima": "4.0.1",
"html-minifier-terser": "7.2.0",
"@crowdsec/express-bouncer": "0.1.0",
"prom-client": "*",
"archiver-zip-encrypted": "2.0.0",
"googleapis": "128.0.0",
"webdav": "5.8.0",
"minio": "8.0.2",
"wildleek": "2.0.0",
"yub": "0.11.1",
"otplib": "12.0.1",
"twilio": "4.19.0",
"plivo": "4.58.0",
"telnyx": "1.25.5",
"telegram": "2.19.8",
"input": "1.0.1",
"discord.js": "14.6.0",
"@xmpp/client": "0.13.1",
"node-pushover": "1.0.0",
"zulip": "0.1.0",
"web-push": "3.6.6",
"firebase-admin": "12.7.0",
"modern-syslog": "1.2.0",
"syslog": "0.1.1-1",
"heapdump": "0.3.15"
}
}

View File

@@ -0,0 +1,54 @@
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p nodejs yarn prefetch-yarn-deps jq rsync common-updater-scripts moreutils
set -exuo pipefail
expr_dir=$(cd "$(dirname "$0")"; pwd)
tmp=$(mktemp -dt update-meshcentral.XXXXXX)
npm show --json meshcentral > "$tmp/npm.json"
version=$(<"$tmp/npm.json" jq -r .version)
tarball=$(<"$tmp/npm.json" jq -r .dist.tarball)
prefetch=$(nix-prefetch-url --unpack --print-path "$tarball" | tr '\n' ' ')
read -r hash storePath <<<"$prefetch"
cd "$tmp"
rsync -r --chmod=u=rwX "$storePath/" package/
cd package
# Very crude way of discovering optional dependencies. These are
# fetched at runtime by stock upstream, but we don't allow that kind
# of thing in nix :)
awk <meshcentral.js "
BEGIN { RS=\"[\n;]\" }
match(\$0, /(modules|passport) = (\[.*\])$/, a) { print a[2] }
match(\$0, /(modules|passport).push\(('[^)]+')\)/, a) { print \"[\" a[2] \"]\" }
" |
tr \' \" |
jq --slurp '[if type == "array" then .[] else . end] | flatten' |
# And an equally crude way of adding them to package.json. We
# can't use yarn add here, because that will blow up on
# dependencies which don't support the current platform. Even with
# --optional.
jq --slurpfile package package.json \
'(. | map(. | capture("(?<name>@?[^@]+)(@(?<version>.+))?") | { key: .name, value: (.version // "*")}) | from_entries) as $optionalDependencies | $package | .[] | .optionalDependencies |= . + $optionalDependencies' |
sponge package.json
# Fetch all the optional dependencies, so we have them available in
# yarn.lock/yarn.nix
yarn install --ignore-scripts
cp package.json "$expr_dir"
cp yarn.lock "$expr_dir/yarn.lock"
cd "$expr_dir/../../../.."
update-source-version meshcentral "$version" "$hash" "$tarball"
new_yarn_hash=$(prefetch-yarn-deps "$expr_dir/yarn.lock")
new_yarn_hash=$(nix-hash --type sha256 --to-sri "$new_yarn_hash")
old_yarn_hash=$(nix-instantiate --eval -A meshcentral.offlineCache.outputHash | tr -d '"')
sed -i "$expr_dir/default.nix" -e "s|\"$old_yarn_hash\"|\"$new_yarn_hash\"|"
# Only clean up if everything worked
cd /
rm -rf "$tmp"

File diff suppressed because it is too large Load Diff