From 8331ba3550228286b42efc87479e50a281860349 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sat, 30 Nov 2019 19:50:31 +0100 Subject: [PATCH] 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] https://github.com/documize/community/commit/b8268521372cdf8862af4f6924ec476b3e431690 --- pkgs/servers/documize-community/default.nix | 31 +++++++-------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/pkgs/servers/documize-community/default.nix b/pkgs/servers/documize-community/default.nix index 2cc6b2a9f74d..a839901e843e 100644 --- a/pkgs/servers/documize-community/default.nix +++ b/pkgs/servers/documize-community/default.nix @@ -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"; - version = "3.5.0"; + version = "3.5.1"; src = fetchFromGitHub { owner = "documize"; repo = "community"; rev = "v${version}"; - sha256 = "1y38lgkxhyrga44wj216vl08fzyv8wbk02a85flnihrb4b1092x0"; + sha256 = "1dnb5b24x50c258fk47i7vngv28gai0mywns6nvgm3q59zyzphbj"; }; - goPackagePath = "github.com/documize/community"; + modSha256 = "1z0v7n8klaxcqv7mvzf3jzgrp78zb4yiibx899ppk6i5qnj4xiv0"; buildInputs = [ go-bindata-assetfs go-bindata ]; - buildPhase = '' - runHook preBuild + subPackages = [ "edition/community.go" ]; - pushd go/src/github.com/documize/community - GO111MODULE=off 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 + postInstall = '' + # `buildGoModule` calls `go install` (without `go build` first), so + # `-o bin/documize` doesn't work. + mv $out/bin/community $out/bin/documize ''; meta = with lib; {