mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 12:53:59 +03:00
Merge pull request #85842 from iblech/patch-whitebophir
whitebophir: init at 1.7.0 (package and service)
This commit is contained in:
commit
0cd5058afd
@ -900,6 +900,7 @@
|
|||||||
./services/web-apps/selfoss.nix
|
./services/web-apps/selfoss.nix
|
||||||
./services/web-apps/shiori.nix
|
./services/web-apps/shiori.nix
|
||||||
./services/web-apps/virtlyst.nix
|
./services/web-apps/virtlyst.nix
|
||||||
|
./services/web-apps/whitebophir.nix
|
||||||
./services/web-apps/wordpress.nix
|
./services/web-apps/wordpress.nix
|
||||||
./services/web-apps/youtrack.nix
|
./services/web-apps/youtrack.nix
|
||||||
./services/web-apps/zabbix.nix
|
./services/web-apps/zabbix.nix
|
||||||
|
45
nixos/modules/services/web-apps/whitebophir.nix
Normal file
45
nixos/modules/services/web-apps/whitebophir.nix
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.services.whitebophir;
|
||||||
|
in {
|
||||||
|
options = {
|
||||||
|
services.whitebophir = {
|
||||||
|
enable = mkEnableOption "whitebophir, an online collaborative whiteboard server (persistent state will be maintained under <filename>/var/lib/whitebophir</filename>)";
|
||||||
|
|
||||||
|
package = mkOption {
|
||||||
|
default = pkgs.whitebophir;
|
||||||
|
defaultText = "pkgs.whitebophir";
|
||||||
|
type = types.package;
|
||||||
|
description = "Whitebophir package to use.";
|
||||||
|
};
|
||||||
|
|
||||||
|
port = mkOption {
|
||||||
|
type = types.port;
|
||||||
|
default = 5001;
|
||||||
|
description = "Port to bind to.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
systemd.services.whitebophir = {
|
||||||
|
description = "Whitebophir Service";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
after = [ "network.target" ];
|
||||||
|
environment = {
|
||||||
|
PORT = "${toString cfg.port}";
|
||||||
|
WBO_HISTORY_DIR = "/var/lib/whitebophir";
|
||||||
|
};
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
DynamicUser = true;
|
||||||
|
ExecStart = "${cfg.package}/bin/whitebophir";
|
||||||
|
Restart = "always";
|
||||||
|
StateDirectory = "whitebophir";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
38
pkgs/servers/web-apps/whitebophir/default.nix
Normal file
38
pkgs/servers/web-apps/whitebophir/default.nix
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
{ stdenv
|
||||||
|
, pkgs
|
||||||
|
, lib
|
||||||
|
, fetchurl
|
||||||
|
, nodejs
|
||||||
|
, runtimeShell
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
nodePackages = import ./node-packages.nix {
|
||||||
|
inherit pkgs nodejs;
|
||||||
|
inherit (stdenv.hostPlatform) system;
|
||||||
|
};
|
||||||
|
|
||||||
|
whitebophir = lib.head (lib.attrValues nodePackages);
|
||||||
|
|
||||||
|
combined = whitebophir.override {
|
||||||
|
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.agpl3;
|
||||||
|
homepage = "https://github.com/lovasoa/whitebophir";
|
||||||
|
maintainers = with maintainers; [ iblech ];
|
||||||
|
platforms = platforms.unix;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
combined
|
9
pkgs/servers/web-apps/whitebophir/generate.sh
Executable file
9
pkgs/servers/web-apps/whitebophir/generate.sh
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/usr/bin/env nix-shell
|
||||||
|
#! nix-shell -i bash -p nodePackages.node2nix
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
node2nix \
|
||||||
|
--input node-packages.json \
|
||||||
|
--output node-packages-generated.nix \
|
||||||
|
--composition node-packages.nix \
|
||||||
|
--node-env ../../../development/node-packages/node-env.nix
|
1495
pkgs/servers/web-apps/whitebophir/node-packages-generated.nix
Normal file
1495
pkgs/servers/web-apps/whitebophir/node-packages-generated.nix
Normal file
File diff suppressed because it is too large
Load Diff
3
pkgs/servers/web-apps/whitebophir/node-packages.json
Normal file
3
pkgs/servers/web-apps/whitebophir/node-packages.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[
|
||||||
|
{ "whitebophir": "git+https://github.com/lovasoa/whitebophir.git#v1.7.0" }
|
||||||
|
]
|
17
pkgs/servers/web-apps/whitebophir/node-packages.nix
generated
Normal file
17
pkgs/servers/web-apps/whitebophir/node-packages.nix
generated
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# This file has been generated by node2nix 1.8.0. Do not edit!
|
||||||
|
|
||||||
|
{pkgs ? import <nixpkgs> {
|
||||||
|
inherit system;
|
||||||
|
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-12_x"}:
|
||||||
|
|
||||||
|
let
|
||||||
|
nodeEnv = import ../../../development/node-packages/node-env.nix {
|
||||||
|
inherit (pkgs) stdenv python2 util-linux runCommand writeTextFile;
|
||||||
|
inherit nodejs;
|
||||||
|
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
import ./node-packages-generated.nix {
|
||||||
|
inherit (pkgs) fetchurl fetchgit;
|
||||||
|
inherit nodeEnv;
|
||||||
|
}
|
@ -8386,6 +8386,8 @@ in
|
|||||||
|
|
||||||
whipper = callPackage ../applications/audio/whipper { };
|
whipper = callPackage ../applications/audio/whipper { };
|
||||||
|
|
||||||
|
whitebophir = callPackage ../servers/web-apps/whitebophir { };
|
||||||
|
|
||||||
whois = callPackage ../tools/networking/whois { };
|
whois = callPackage ../tools/networking/whois { };
|
||||||
|
|
||||||
wifish = callPackage ../tools/networking/wifish { };
|
wifish = callPackage ../tools/networking/wifish { };
|
||||||
|
Loading…
Reference in New Issue
Block a user