uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
39
pkgs/tools/admin/meshcentral/default.nix
Normal file
39
pkgs/tools/admin/meshcentral/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ lib, fetchpatch, fetchzip, yarn2nix-moretea, nodejs, jq, dos2unix }:
|
||||
|
||||
yarn2nix-moretea.mkYarnPackage rec {
|
||||
version = "1.0.18";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://registry.npmjs.org/meshcentral/-/meshcentral-${version}.tgz";
|
||||
sha256 = "03bs7c2n4cxpsjkrcwinmjarcfwxvkg10xvnjk5r1rnkzlrsy8pm";
|
||||
};
|
||||
|
||||
packageJSON = ./package.json;
|
||||
yarnLock = ./yarn.lock;
|
||||
yarnNix = ./yarn.nix;
|
||||
|
||||
# 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}/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/info/";
|
||||
maintainers = [ maintainers.lheckemann ];
|
||||
license = licenses.asl20;
|
||||
};
|
||||
}
|
||||
128
pkgs/tools/admin/meshcentral/package.json
Normal file
128
pkgs/tools/admin/meshcentral/package.json
Normal file
|
|
@ -0,0 +1,128 @@
|
|||
{
|
||||
"name": "meshcentral",
|
||||
"version": "1.0.18",
|
||||
"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": {
|
||||
"body-parser": "^1.19.0",
|
||||
"cbor": "~5.2.0",
|
||||
"compression": "^1.7.4",
|
||||
"cookie-session": "^1.4.0",
|
||||
"express": "^4.17.0",
|
||||
"express-handlebars": "^5.3.5",
|
||||
"express-ws": "^4.0.0",
|
||||
"ipcheck": "^0.1.0",
|
||||
"minimist": "^1.2.5",
|
||||
"multiparty": "^4.2.1",
|
||||
"@yetzt/nedb": "^1.8.0",
|
||||
"node-forge": "^1.0.0",
|
||||
"ws": "^5.2.3",
|
||||
"yauzl": "^2.10.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Ylianst/MeshCentral.git"
|
||||
},
|
||||
"readme": "readme.txt",
|
||||
"optionalDependencies": {
|
||||
"passport": "*",
|
||||
"passport-twitter": "*",
|
||||
"passport-google-oauth20": "*",
|
||||
"passport-github2": "*",
|
||||
"passport-reddit": "*",
|
||||
"passport-azure-oauth2": "*",
|
||||
"jwt-simple": "*",
|
||||
"@mstrhakr/passport-generic-oidc": "*",
|
||||
"passport-saml": "*",
|
||||
"ws": "5.2.3",
|
||||
"cbor": "5.2.0",
|
||||
"@yetzt/nedb": "*",
|
||||
"https": "*",
|
||||
"yauzl": "*",
|
||||
"ipcheck": "*",
|
||||
"express": "*",
|
||||
"archiver": "4.0.2",
|
||||
"multiparty": "*",
|
||||
"node-forge": "*",
|
||||
"express-ws": "4.0.0",
|
||||
"compression": "*",
|
||||
"body-parser": "*",
|
||||
"cookie-session": "1.4.0",
|
||||
"express-handlebars": "*",
|
||||
"node-windows": "0.1.4",
|
||||
"loadavg-windows": "*",
|
||||
"node-sspi": "*",
|
||||
"ldapauth-fork": "*",
|
||||
"ssh2": "*",
|
||||
"image-size": "*",
|
||||
"acme-client": "*",
|
||||
"aedes": "0.39.0",
|
||||
"mysql": "*",
|
||||
"@mysql/xdevapi": "*",
|
||||
"mongodb": "4.1.0",
|
||||
"saslprep": "*",
|
||||
"pg": "8.7.1",
|
||||
"pgtools": "0.3.2",
|
||||
"mariadb": "*",
|
||||
"node-vault": "*",
|
||||
"semver": "*",
|
||||
"https-proxy-agent": "*",
|
||||
"mongojs": "*",
|
||||
"nodemailer": "*",
|
||||
"@sendgrid/mail": "*",
|
||||
"jsdom": "*",
|
||||
"esprima": "*",
|
||||
"minify-js": "*",
|
||||
"html-minifier": "*",
|
||||
"archiver-zip-encrypted": "*",
|
||||
"googleapis": "*",
|
||||
"webdav": "*",
|
||||
"wildleek": "2.0.0",
|
||||
"yubikeyotp": "*",
|
||||
"otplib": "10.2.3",
|
||||
"twilio": "*",
|
||||
"plivo": "*",
|
||||
"telnyx": "*",
|
||||
"web-push": "*",
|
||||
"node-xcs": "*",
|
||||
"modern-syslog": "*",
|
||||
"syslog": "*",
|
||||
"heapdump": "*"
|
||||
}
|
||||
}
|
||||
50
pkgs/tools/admin/meshcentral/update.sh
Executable file
50
pkgs/tools/admin/meshcentral/update.sh
Executable file
|
|
@ -0,0 +1,50 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p nodejs yarn yarn2nix 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"
|
||||
yarn2nix > "$expr_dir/yarn.nix"
|
||||
|
||||
cd "$expr_dir/../../../.."
|
||||
update-source-version meshcentral "$version" "$hash" "$tarball"
|
||||
|
||||
# Only clean up if everything worked
|
||||
cd /
|
||||
rm -rf "$tmp"
|
||||
7717
pkgs/tools/admin/meshcentral/yarn.lock
Normal file
7717
pkgs/tools/admin/meshcentral/yarn.lock
Normal file
File diff suppressed because it is too large
Load diff
8421
pkgs/tools/admin/meshcentral/yarn.nix
Normal file
8421
pkgs/tools/admin/meshcentral/yarn.nix
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue