2023-09-13 02:53:43 +00:00
|
|
|
{ lib
|
|
|
|
, buildNpmPackage
|
|
|
|
, fetchFromGitHub
|
2023-05-10 14:46:37 +00:00
|
|
|
, nodejs_20
|
2021-01-13 00:22:31 +00:00
|
|
|
, runtimeShell
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2023-05-10 14:46:37 +00:00
|
|
|
nodejs = nodejs_20;
|
2023-11-09 16:23:45 +00:00
|
|
|
in buildNpmPackage rec {
|
2023-09-13 02:53:43 +00:00
|
|
|
pname = "whitebophir";
|
|
|
|
version = "1.19.1";
|
2022-01-16 18:13:18 +00:00
|
|
|
|
2023-09-13 02:53:43 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lovasoa";
|
|
|
|
repo = "whitebophir";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-4T7s9WrpyHVPcw0QY0C0sczDJYKzA4bAAfEv8q2pOy4=";
|
2021-01-13 00:22:31 +00:00
|
|
|
};
|
|
|
|
|
2023-11-09 16:23:45 +00:00
|
|
|
inherit nodejs;
|
|
|
|
|
2023-09-13 02:53:43 +00:00
|
|
|
npmDepsHash = "sha256-mKDkkX7vWrnfEg1D65bqn/MtyUS0DKjTtkDW6ebso7g=";
|
|
|
|
|
|
|
|
# geckodriver tries to access network
|
|
|
|
npmFlags = [ "--ignore-scripts" ];
|
|
|
|
|
|
|
|
dontNpmBuild = true;
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
out_whitebophir=$out/lib/node_modules/whitebophir
|
|
|
|
|
|
|
|
mkdir $out/bin
|
|
|
|
cat <<EOF > $out/bin/whitebophir
|
|
|
|
#!${runtimeShell}
|
|
|
|
exec ${nodejs}/bin/node $out_whitebophir/server/server.js
|
|
|
|
EOF
|
|
|
|
chmod +x $out/bin/whitebophir
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Online collaborative whiteboard that is simple, free, easy to use and to deploy";
|
|
|
|
license = licenses.agpl3Plus;
|
|
|
|
homepage = "https://github.com/lovasoa/whitebophir";
|
|
|
|
mainProgram = "whitebophir";
|
|
|
|
maintainers = with maintainers; [ iblech ];
|
|
|
|
platforms = platforms.unix;
|
2021-01-13 00:22:31 +00:00
|
|
|
};
|
2023-09-13 02:53:43 +00:00
|
|
|
}
|