2023-10-09 19:29:22 +00:00
|
|
|
{ lib
|
|
|
|
, fetchzip
|
|
|
|
, fetchYarnDeps
|
|
|
|
, yarn2nix-moretea
|
|
|
|
, nodejs_18
|
|
|
|
, dos2unix
|
|
|
|
}:
|
2021-08-12 14:41:47 +00:00
|
|
|
|
2022-12-02 08:20:57 +00:00
|
|
|
yarn2nix-moretea.mkYarnPackage {
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "1.1.26";
|
2021-08-05 21:33:18 +00:00
|
|
|
|
|
|
|
src = fetchzip {
|
2024-07-27 06:49:29 +00:00
|
|
|
url = "https://registry.npmjs.org/meshcentral/-/meshcentral-1.1.26.tgz";
|
|
|
|
sha256 = "038gywymz0spsxkfz3gzgv6cpk1n4phx8r1h14wzq30pwkw90nr6";
|
2021-08-05 21:33:18 +00:00
|
|
|
};
|
|
|
|
|
2022-12-02 08:20:57 +00:00
|
|
|
patches = [ ./fix-js-include-paths.patch ];
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
packageJSON = ./package.json;
|
|
|
|
yarnLock = ./yarn.lock;
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
offlineCache = fetchYarnDeps {
|
|
|
|
yarnLock = ./yarn.lock;
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-FGlSxmIk6VP/NKZNLfYkFjUgY9m2VM0ZYoNq2b+zTHI=";
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
2021-08-05 21:33:18 +00:00
|
|
|
|
|
|
|
# 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
|
2023-05-24 13:37:59 +00:00
|
|
|
sed -i '1i#!${nodejs_18}/bin/node' $out/libexec/meshcentral/deps/meshcentral/meshcentral.js
|
2021-08-05 21:33:18 +00:00
|
|
|
ln -s $out/libexec/meshcentral/deps/meshcentral/meshcentral.js $out/bin/meshcentral
|
|
|
|
'';
|
|
|
|
|
|
|
|
publishBinsFor = [ ];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
passthru.updateScript = ./update.sh;
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Computer management web app";
|
2023-10-09 19:29:22 +00:00
|
|
|
homepage = "https://meshcentral.com/";
|
2024-01-25 14:12:00 +00:00
|
|
|
maintainers = with maintainers; [ ma27 ];
|
2021-08-05 21:33:18 +00:00
|
|
|
license = licenses.asl20;
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "meshcentral";
|
2021-08-05 21:33:18 +00:00
|
|
|
};
|
|
|
|
}
|