02cf88bb76
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
48 lines
987 B
Nix
48 lines
987 B
Nix
{ lib, buildGoModule, fetchFromGitHub, makeWrapper
|
|
, git, bash, gzip, openssh, pam
|
|
, sqliteSupport ? true
|
|
, pamSupport ? true
|
|
}:
|
|
|
|
with lib;
|
|
|
|
buildGoModule rec {
|
|
pname = "gogs";
|
|
version = "0.12.10";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "gogs";
|
|
repo = "gogs";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-EFGC94aIMW7AYJpgaHBT4W7BjXd+oijMqQPH40rIvlg=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-5AnQ7zF2UK1HNoyr6gwFdVv+KMJEGkjKPpDEpUXckUg=";
|
|
|
|
subPackages = [ "." ];
|
|
|
|
postPatch = ''
|
|
patchShebangs .
|
|
'';
|
|
|
|
nativeBuildInputs = [ makeWrapper openssh ];
|
|
|
|
buildInputs = optional pamSupport pam;
|
|
|
|
tags =
|
|
( optional sqliteSupport "sqlite"
|
|
++ optional pamSupport "pam");
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/gogs \
|
|
--prefix PATH : ${makeBinPath [ bash git gzip openssh ]}
|
|
'';
|
|
|
|
meta = {
|
|
description = "A painless self-hosted Git service";
|
|
homepage = "https://gogs.io";
|
|
license = licenses.mit;
|
|
maintainers = [ maintainers.schneefux ];
|
|
};
|
|
}
|