2021-02-05 17:12:51 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, makeWrapper
|
2020-04-24 23:36:52 +00:00
|
|
|
, git, bash, gzip, openssh, pam
|
|
|
|
, sqliteSupport ? true
|
|
|
|
, pamSupport ? true
|
|
|
|
}:
|
|
|
|
|
2021-01-17 00:15:33 +00:00
|
|
|
with lib;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-30 08:33:03 +00:00
|
|
|
buildGoModule rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "gogs";
|
2023-03-04 12:14:45 +00:00
|
|
|
version = "0.13.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gogs";
|
|
|
|
repo = "gogs";
|
|
|
|
rev = "v${version}";
|
2023-03-04 12:14:45 +00:00
|
|
|
sha256 = "sha256-UfxE+NaqDr3XUXpvlV989Iwjq/lsAwpMTDAPkcOmma8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
vendorHash = "sha256-ISJOEJ1DWO4nnMpDuZ36Nq528LhgekDh3XUF8adlj2w=";
|
2020-11-30 08:33:03 +00:00
|
|
|
|
|
|
|
subPackages = [ "." ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
|
|
|
|
2020-11-30 08:33:03 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper openssh ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = optional pamSupport pam;
|
|
|
|
|
2021-08-08 23:34:03 +00:00
|
|
|
tags =
|
2020-04-24 23:36:52 +00:00
|
|
|
( optional sqliteSupport "sqlite"
|
|
|
|
++ optional pamSupport "pam");
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
wrapProgram $out/bin/gogs \
|
2020-04-24 23:36:52 +00:00
|
|
|
--prefix PATH : ${makeBinPath [ bash git gzip openssh ]}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Painless self-hosted Git service";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://gogs.io";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.schneefux ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "gogs";
|
2024-01-13 08:15:51 +00:00
|
|
|
knownVulnerabilities = [ ''
|
|
|
|
Gogs has known unpatched vulnerabilities and upstream maintainers appears to be unresponsive.
|
|
|
|
|
|
|
|
More information can be found in forgejo's blogpost: https://forgejo.org/2023-11-release-v1-20-5-1/
|
|
|
|
|
|
|
|
You might want to consider migrating to Gitea or forgejo.
|
|
|
|
'' ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|