3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/version-management/gogs/default.nix

28 lines
840 B
Nix
Raw Normal View History

{ stdenv, buildGoPackage, fetchgit, makeWrapper, git, sqliteSupport ? true }:
2016-02-29 04:00:45 +00:00
buildGoPackage rec {
name = "gogs-${version}";
version = "20160728-${stdenv.lib.strings.substring 0 7 rev}";
rev = "ad7ea88923e371df7558835d8f3e0236cfdf69ba";
2016-02-29 04:00:45 +00:00
buildInputs = [ makeWrapper ];
buildFlags = stdenv.lib.optional (sqliteSupport) "-tags sqlite";
2016-02-29 04:00:45 +00:00
goPackagePath = "github.com/gogits/gogs";
postInstall = ''
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} ."
'';
src = fetchgit {
inherit rev;
url = "https://github.com/gogits/gogs";
sha256 = "0vgkhpwvj79shpi3bq2sr1nza53fidmnbmh814ic09jnb2dilnrm";
2016-02-29 04:00:45 +00:00
};
goDeps = ./deps.json;
2016-02-29 04:00:45 +00:00
}