mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-30 10:53:11 +00:00
commit
26fe842ec5
@ -3,25 +3,26 @@
|
|||||||
, sqliteSupport ? true
|
, sqliteSupport ? true
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
with stdenv.lib;
|
||||||
|
|
||||||
buildGoPackage rec {
|
buildGoPackage rec {
|
||||||
name = "gogs-${version}";
|
name = "gogs-${version}";
|
||||||
version = "0.9.113";
|
version = "0.10.18";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "gogits";
|
owner = "gogits";
|
||||||
repo = "gogs";
|
repo = "gogs";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1zk83c9jiazfw3221yi2sidp7917q3dxb2xb7wrjg4an18gj46j7";
|
sha256 = "1f1dlickjpdilf4j295i9v2h4ig4pf5d2mnpbr59wh14bby4bh0y";
|
||||||
};
|
};
|
||||||
|
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
substituteInPlace models/repo.go \
|
patchShebangs .
|
||||||
--replace '#!/usr/bin/env' '#!${coreutils}/bin/env'
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
buildFlags = stdenv.lib.optionalString sqliteSupport "-tags sqlite";
|
buildFlags = optionalString sqliteSupport "-tags sqlite";
|
||||||
|
|
||||||
outputs = [ "bin" "out" "data" ];
|
outputs = [ "bin" "out" "data" ];
|
||||||
|
|
||||||
@ -30,7 +31,7 @@ buildGoPackage rec {
|
|||||||
cp -R $src/{public,templates} $data
|
cp -R $src/{public,templates} $data
|
||||||
|
|
||||||
wrapProgram $bin/bin/gogs \
|
wrapProgram $bin/bin/gogs \
|
||||||
--prefix PATH : ${stdenv.lib.makeBinPath [ bash git gzip openssh ]} \
|
--prefix PATH : ${makeBinPath [ bash git gzip openssh ]} \
|
||||||
--run 'export GOGS_WORK_DIR=''${GOGS_WORK_DIR:-$PWD}' \
|
--run 'export GOGS_WORK_DIR=''${GOGS_WORK_DIR:-$PWD}' \
|
||||||
--run 'mkdir -p "$GOGS_WORK_DIR" && cd "$GOGS_WORK_DIR"' \
|
--run 'mkdir -p "$GOGS_WORK_DIR" && cd "$GOGS_WORK_DIR"' \
|
||||||
--run "ln -fs $data/{public,templates} ."
|
--run "ln -fs $data/{public,templates} ."
|
||||||
@ -42,7 +43,7 @@ buildGoPackage rec {
|
|||||||
meta = {
|
meta = {
|
||||||
description = "A painless self-hosted Git service";
|
description = "A painless self-hosted Git service";
|
||||||
homepage = "https://gogs.io";
|
homepage = "https://gogs.io";
|
||||||
license = stdenv.lib.licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = with stdenv.lib.maintainers; [ schneefux ];
|
maintainers = [ maintainers.schneefux ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user