depot/third_party/nixpkgs/pkgs/servers/web-apps/whitebophir/default.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

47 lines
1.1 KiB
Nix

{ lib
, buildNpmPackage
, fetchFromGitHub
, nodejs_20
, runtimeShell
}:
let
nodejs = nodejs_20;
in buildNpmPackage.override { nodejs = nodejs_20; } rec {
pname = "whitebophir";
version = "1.19.1";
src = fetchFromGitHub {
owner = "lovasoa";
repo = "whitebophir";
rev = "v${version}";
hash = "sha256-4T7s9WrpyHVPcw0QY0C0sczDJYKzA4bAAfEv8q2pOy4=";
};
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;
};
}