nixpkgs/pkgs/applications/version-management/gogs/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
986 B
Nix
Raw Normal View History

{ lib, buildGoModule, fetchFromGitHub, makeWrapper
2018-12-23 00:52:39 +00:00
, git, bash, gzip, openssh, pam
2016-10-10 16:11:58 +01:00
, sqliteSupport ? true
2018-12-23 00:52:39 +00:00
, pamSupport ? true
2016-10-10 16:11:58 +01:00
}:
2016-02-29 04:00:45 +00:00
2021-01-15 13:21:58 +00:00
with lib;
2017-03-22 21:52:52 +00:00
2020-10-29 14:30:57 +00:00
buildGoModule rec {
pname = "gogs";
2022-03-12 09:40:25 +00:00
version = "0.12.5";
2016-10-10 16:11:58 +01:00
src = fetchFromGitHub {
2018-08-30 13:43:49 +01:00
owner = "gogs";
2016-10-10 16:11:58 +01:00
repo = "gogs";
rev = "v${version}";
2022-03-12 09:40:25 +00:00
sha256 = "sha256-I3kFRKgVMGMKgHU5VEeNai8FseN/ea6MzEP94AR2Zfo=";
2016-10-10 16:11:58 +01:00
};
2022-01-24 11:48:10 +00:00
vendorSha256 = "sha256-3dT5D+oDd0mpJp/cP53TQcRUkmqh6g3sRBWWAUqhaAo=";
2020-10-29 14:30:57 +00:00
subPackages = [ "." ];
postPatch = ''
2017-03-22 21:52:52 +00:00
patchShebangs .
'';
2016-02-29 04:00:45 +00:00
2020-10-29 14:30:57 +00:00
nativeBuildInputs = [ makeWrapper openssh ];
2020-03-18 09:26:23 +00:00
buildInputs = optional pamSupport pam;
2016-10-10 16:11:58 +01:00
2021-08-08 01:11:16 +01:00
tags =
( optional sqliteSupport "sqlite"
++ optional pamSupport "pam");
2016-10-10 16:11:58 +01:00
postInstall = ''
wrapProgram $out/bin/gogs \
2017-10-02 20:04:32 +01:00
--prefix PATH : ${makeBinPath [ bash git gzip openssh ]}
2016-02-29 04:00:45 +00:00
'';
2016-10-10 16:11:58 +01:00
meta = {
description = "A painless self-hosted Git service";
homepage = "https://gogs.io";
2017-03-22 21:52:52 +00:00
license = licenses.mit;
maintainers = [ maintainers.schneefux ];
2016-10-10 16:11:58 +01:00
};
2016-02-29 04:00:45 +00:00
}