| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- {
- lib,
- fetchFromGitHub,
- buildGoModule,
- makeWrapper,
- git,
- openssh,
- pam,
- stdenv,
- }:
- buildGoModule rec {
- pname = "gogs";
- version = "0.14.3";
- src = fetchFromGitHub {
- owner = "gogs";
- repo = "gogs";
- rev = "v${version}";
- hash = "sha256-/WWOH6Tx/zxhYJlIaK6kcEKUUzUXOT30ONAx1FpZLMY=";
- };
- vendorHash = "sha256-k+PdCynhcnerlk7Ut+GbA0P7KEC/eDW8RY1tCmIEeWQ=";
- nativeBuildInputs = [ makeWrapper ];
- buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pam ];
- tags = [
- "cert"
- "sqlite"
- ]
- ++ lib.optionals stdenv.hostPlatform.isLinux [ "pam" ];
- subPackages = [ "." ];
- postInstall = ''
- mkdir -p $out/share/gogs
- cp -r conf templates public $out/share/gogs/
- wrapProgram $out/bin/gogs \
- --prefix PATH : ${lib.makeBinPath [ git openssh ]}
- '';
- meta = {
- description = "Painless self-hosted Git service customized for isolated environment execution";
- homepage = "https://gogs.io";
- license = lib.licenses.mit;
- platforms = lib.platforms.unix;
- mainProgram = "gogs";
- };
- }
|