depot/third_party/nixpkgs/pkgs/applications/version-management/gogs/default.nix
Default email 4d5a95770c Project import generated by Copybara.
GitOrigin-RevId: 3c5319ad3aa51551182ac82ea17ab1c6b0f0df89
2023-03-04 15:14:45 +03:00

48 lines
986 B
Nix

{ lib, buildGoModule, fetchFromGitHub, makeWrapper
, git, bash, gzip, openssh, pam
, sqliteSupport ? true
, pamSupport ? true
}:
with lib;
buildGoModule rec {
pname = "gogs";
version = "0.13.0";
src = fetchFromGitHub {
owner = "gogs";
repo = "gogs";
rev = "v${version}";
sha256 = "sha256-UfxE+NaqDr3XUXpvlV989Iwjq/lsAwpMTDAPkcOmma8=";
};
vendorSha256 = "sha256-ISJOEJ1DWO4nnMpDuZ36Nq528LhgekDh3XUF8adlj2w=";
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 ];
};
}