2021-08-05 21:33:18 +00:00
|
|
|
{ lib, fetchpatch, fetchzip, yarn2nix-moretea, nodejs, jq, dos2unix }:
|
2021-08-12 14:41:47 +00:00
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
yarn2nix-moretea.mkYarnPackage rec {
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "0.9.98";
|
2021-08-05 21:33:18 +00:00
|
|
|
|
|
|
|
src = fetchzip {
|
2021-08-12 14:41:47 +00:00
|
|
|
url = "https://registry.npmjs.org/meshcentral/-/meshcentral-${version}.tgz";
|
2022-03-30 09:31:56 +00:00
|
|
|
sha256 = "0bvd6fin05dkh6x5qx2f58c0zsmxpdlwb8wqm0y04bax1mhm1bsf";
|
2021-08-05 21:33:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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 = [ ];
|
|
|
|
|
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";
|
|
|
|
homepage = "https://meshcentral.com/info/";
|
|
|
|
maintainers = [ maintainers.lheckemann ];
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|