2023-09-06 04:58:39 +00:00
|
|
|
{ lib
|
|
|
|
, fetchzip
|
|
|
|
, fetchYarnDeps
|
|
|
|
, yarn2nix-moretea
|
|
|
|
, nodejs_18
|
|
|
|
, dos2unix
|
|
|
|
}:
|
2021-08-11 09:59:42 +00:00
|
|
|
|
2022-11-29 13:28:54 +00:00
|
|
|
yarn2nix-moretea.mkYarnPackage {
|
2023-06-17 09:10:38 +00:00
|
|
|
version = "1.1.6";
|
2021-07-21 08:20:58 +00:00
|
|
|
|
|
|
|
src = fetchzip {
|
2023-06-17 09:10:38 +00:00
|
|
|
url = "https://registry.npmjs.org/meshcentral/-/meshcentral-1.1.6.tgz";
|
|
|
|
sha256 = "03f2jyjrxmmr28949m3niwb437akyp6kg6h1m2jkaxfg5yj4hs4v";
|
2021-07-21 08:20:58 +00:00
|
|
|
};
|
|
|
|
|
2022-11-29 13:28:54 +00:00
|
|
|
patches = [ ./fix-js-include-paths.patch ];
|
|
|
|
|
2021-07-21 08:20:58 +00:00
|
|
|
packageJSON = ./package.json;
|
|
|
|
yarnLock = ./yarn.lock;
|
2023-09-06 04:58:39 +00:00
|
|
|
|
|
|
|
offlineCache = fetchYarnDeps {
|
|
|
|
yarnLock = ./yarn.lock;
|
|
|
|
hash = "sha256-aKWa6pvIi2JkOtpiWH19KZoncPuSIgvDk/j7PvXp2nw=";
|
|
|
|
};
|
2021-07-21 08:20:58 +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-14 12:56:05 +00:00
|
|
|
sed -i '1i#!${nodejs_18}/bin/node' $out/libexec/meshcentral/deps/meshcentral/meshcentral.js
|
2021-07-21 08:20:58 +00:00
|
|
|
ln -s $out/libexec/meshcentral/deps/meshcentral/meshcentral.js $out/bin/meshcentral
|
|
|
|
'';
|
|
|
|
|
|
|
|
publishBinsFor = [ ];
|
|
|
|
|
2021-10-28 22:57:16 +00:00
|
|
|
passthru.updateScript = ./update.sh;
|
|
|
|
|
2021-07-21 08:20:58 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Computer management web app";
|
2023-09-14 00:24:09 +00:00
|
|
|
homepage = "https://meshcentral.com/";
|
2021-07-21 08:20:58 +00:00
|
|
|
maintainers = [ maintainers.lheckemann ];
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|