3
0
Fork 0
forked from mirrors/nixpkgs

documize-community: 3.5.0 -> 3.5.1

https://github.com/documize/community/releases/tag/v3.5.1

This patch also switches to a `go.mod`-based build as upstream already
switched to it a while ago[1].

[1] b826852137
This commit is contained in:
Maximilian Bosch 2019-11-30 19:50:31 +01:00
parent 05521bc61b
commit 8331ba3550
No known key found for this signature in database
GPG key ID: 091DBF4D1FC46B8E

View file

@ -1,37 +1,26 @@
{ lib, buildGoPackage, fetchFromGitHub, go-bindata, go-bindata-assetfs }: { lib, buildGoModule, fetchFromGitHub, go-bindata, go-bindata-assetfs }:
buildGoPackage rec { buildGoModule rec {
pname = "documize-community"; pname = "documize-community";
version = "3.5.0"; version = "3.5.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "documize"; owner = "documize";
repo = "community"; repo = "community";
rev = "v${version}"; rev = "v${version}";
sha256 = "1y38lgkxhyrga44wj216vl08fzyv8wbk02a85flnihrb4b1092x0"; sha256 = "1dnb5b24x50c258fk47i7vngv28gai0mywns6nvgm3q59zyzphbj";
}; };
goPackagePath = "github.com/documize/community"; modSha256 = "1z0v7n8klaxcqv7mvzf3jzgrp78zb4yiibx899ppk6i5qnj4xiv0";
buildInputs = [ go-bindata-assetfs go-bindata ]; buildInputs = [ go-bindata-assetfs go-bindata ];
buildPhase = '' subPackages = [ "edition/community.go" ];
runHook preBuild
pushd go/src/github.com/documize/community postInstall = ''
GO111MODULE=off go build -gcflags="all=-trimpath=$GOPATH" -o bin/documize ./edition/community.go # `buildGoModule` calls `go install` (without `go build` first), so
popd # `-o bin/documize` doesn't work.
mv $out/bin/community $out/bin/documize
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; { meta = with lib; {