gogs: FIX public and templates use from bin

This commit is contained in:
Kamil Chmielewski 2016-07-29 18:32:13 +02:00 committed by schneefux
parent 5a7d267ec3
commit 6101eb2454
No known key found for this signature in database
GPG Key ID: 50F2BF336737C2F0

View File

@ -8,13 +8,17 @@ buildGoPackage rec {
buildInputs = [ makeWrapper ];
buildFlags = stdenv.lib.optional (sqliteSupport) "-tags sqlite";
goPackagePath = "github.com/gogits/gogs";
outputs = [ "out" "bin" "data" ];
postInstall = ''
mkdir $data
cp -R $src/{public,templates} $data
wrapProgram $bin/bin/gogs \
--prefix PATH : ${git}/bin \
--run 'export GOGS_WORK_DIR=''${GOGS_WORK_DIR:-$PWD}' \
--run 'cd "$GOGS_WORK_DIR"' \
--run "ln -fs $out/share/go/src/${goPackagePath}/{public,templates} ."
--run "ln -fs $data/{public,templates} ."
'';
src = fetchgit {