From acbb74ed18c5e23893f18d5ac2c5eb9b643e3f64 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Tue, 26 Mar 2019 19:04:28 +0100 Subject: documize-community: init at 2.2.1 Documize is an open-source alternative for wiki software like Confluence based on Go and EmberJS. This patch adds the sources for the community edition[1], for commercial their paid-plan[2] needs to be used. For commercial use a derivation that bundles the commercial package and contains a `$out/bin/documize` can be passed to `services.documize.enable`. The package compiles the Go sources, the build process also bundles the pre-built frontend from `gui/public` into the binary. The NixOS module generates a simple `systemd` unit which starts the service as a dynamic user, database and a reverse proxy won't be configured. [1] https://www.documize.com/get-started/ [2] https://www.documize.com/pricing/ --- pkgs/servers/documize-community/default.nix | 43 +++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 pkgs/servers/documize-community/default.nix (limited to 'pkgs/servers/documize-community') diff --git a/pkgs/servers/documize-community/default.nix b/pkgs/servers/documize-community/default.nix new file mode 100644 index 0000000000000..4f1a420c9109e --- /dev/null +++ b/pkgs/servers/documize-community/default.nix @@ -0,0 +1,43 @@ +{ lib, buildGoPackage, fetchFromGitHub, go-bindata, go-bindata-assetfs }: + +buildGoPackage rec { + pname = "documize-community"; + version = "2.2.1"; + + src = fetchFromGitHub { + owner = "documize"; + repo = "community"; + rev = "v${version}"; + sha256 = "09s5js0zb3mh3g5qz8f3l2cqjn01kjb35kinfv932nf2rfyrmyqz"; + }; + + goPackagePath = "github.com/documize/community"; + + buildInputs = [ go-bindata-assetfs go-bindata ]; + + buildPhase = '' + runHook preBuild + + pushd go/src/github.com/documize/community + go build -gcflags="all=-trimpath=$GOPATH" -o bin/documize ./edition/community.go + popd + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + mkdir -p $bin/bin + cp go/src/github.com/documize/community/bin/documize $bin/bin + + runHook postInstall + ''; + + meta = with lib; { + description = "Open source Confluence alternative for internal & external docs built with Golang + EmberJS"; + license = licenses.agpl3; + maintainers = with maintainers; [ ma27 ]; + homepage = https://www.documize.com/; + }; +} -- cgit 1.4.1