diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2019-03-26 19:04:28 +0100 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2019-04-08 23:54:57 +0200 |
commit | acbb74ed18c5e23893f18d5ac2c5eb9b643e3f64 (patch) | |
tree | 8e6c44cdd6b9b4f3f6fd45e5a2672fdefabc5c98 /pkgs/servers/documize-community | |
parent | ef48aaff73b5e01fa4e3878ca2540ea877d2aa67 (diff) |
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/
Diffstat (limited to 'pkgs/servers/documize-community')
-rw-r--r-- | pkgs/servers/documize-community/default.nix | 43 |
1 files changed, 43 insertions, 0 deletions
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/; + }; +} |