2021-01-25 09:26:54 +01:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, makeWrapper
|
2018-12-23 01:52:39 +01:00
|
|
|
, git, bash, gzip, openssh, pam
|
2016-10-10 17:11:58 +02:00
|
|
|
, sqliteSupport ? true
|
2018-12-23 01:52:39 +01:00
|
|
|
, pamSupport ? true
|
2016-10-10 17:11:58 +02:00
|
|
|
}:
|
2016-02-29 05:00:45 +01:00
|
|
|
|
2021-01-15 14:21:58 +01:00
|
|
|
with lib;
|
2017-03-22 22:52:52 +01:00
|
|
|
|
2020-10-29 15:30:57 +01:00
|
|
|
buildGoModule rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "gogs";
|
2022-08-02 18:26:52 +02:00
|
|
|
version = "0.12.10";
|
2016-10-10 17:11:58 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2018-08-30 14:43:49 +02:00
|
|
|
owner = "gogs";
|
2016-10-10 17:11:58 +02:00
|
|
|
repo = "gogs";
|
|
|
|
rev = "v${version}";
|
2022-08-02 18:26:52 +02:00
|
|
|
sha256 = "sha256-EFGC94aIMW7AYJpgaHBT4W7BjXd+oijMqQPH40rIvlg=";
|
2016-10-10 17:11:58 +02:00
|
|
|
};
|
|
|
|
|
2022-05-22 19:12:08 +02:00
|
|
|
vendorSha256 = "sha256-5AnQ7zF2UK1HNoyr6gwFdVv+KMJEGkjKPpDEpUXckUg=";
|
2020-10-29 15:30:57 +01:00
|
|
|
|
|
|
|
subPackages = [ "." ];
|
2017-10-02 23:15:13 +02:00
|
|
|
|
|
|
|
postPatch = ''
|
2017-03-22 22:52:52 +01:00
|
|
|
patchShebangs .
|
2017-10-02 23:15:13 +02:00
|
|
|
'';
|
2016-02-29 05:00:45 +01:00
|
|
|
|
2020-10-29 15:30:57 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper openssh ];
|
2020-03-18 10:26:23 +01:00
|
|
|
|
|
|
|
buildInputs = optional pamSupport pam;
|
2016-10-10 17:11:58 +02:00
|
|
|
|
2021-08-08 02:11:16 +02:00
|
|
|
tags =
|
2019-03-25 21:41:51 +01:00
|
|
|
( optional sqliteSupport "sqlite"
|
|
|
|
++ optional pamSupport "pam");
|
2016-10-10 17:11:58 +02:00
|
|
|
|
2017-10-06 07:26:19 +02:00
|
|
|
postInstall = ''
|
2016-07-29 18:32:13 +02:00
|
|
|
|
2020-04-28 03:50:57 +02:00
|
|
|
wrapProgram $out/bin/gogs \
|
2017-10-02 21:04:32 +02:00
|
|
|
--prefix PATH : ${makeBinPath [ bash git gzip openssh ]}
|
2016-02-29 05:00:45 +01:00
|
|
|
'';
|
|
|
|
|
2016-10-10 17:11:58 +02:00
|
|
|
meta = {
|
|
|
|
description = "A painless self-hosted Git service";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://gogs.io";
|
2017-03-22 22:52:52 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.schneefux ];
|
2016-10-10 17:11:58 +02:00
|
|
|
};
|
2016-02-29 05:00:45 +01:00
|
|
|
}
|