3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/version-management/gogs/default.nix
Silvan Mosberger f5fa5fa4d6 pkgs: refactor needless quoting of homepage meta attribute (#27809)
* pkgs: refactor needless quoting of homepage meta attribute

A lot of packages are needlessly quoting the homepage meta attribute
(about 1400, 22%), this commit refactors all of those instances.

* pkgs: Fixing some links that were wrongfully unquoted in the previous
commit

* Fixed some instances
2017-08-01 22:03:30 +02:00

51 lines
1.2 KiB
Nix

{ stdenv, buildGoPackage, fetchFromGitHub, makeWrapper
, git, coreutils, bash, gzip, openssh
, sqliteSupport ? true
}:
with stdenv.lib;
buildGoPackage rec {
name = "gogs-${version}";
version = "0.11.19";
src = fetchFromGitHub {
owner = "gogits";
repo = "gogs";
rev = "v${version}";
sha256 = "0smzklhpfv3smqgzd0cnjdif3zi5q7b02grrnb5zssmdi1b2dlsd";
};
patchPhase = ''
patchShebangs .
'';
nativeBuildInputs = [ makeWrapper ];
buildFlags = optionalString sqliteSupport "-tags sqlite";
outputs = [ "bin" "out" "data" ];
postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
install_name_tool -delete_rpath $out/lib $bin/bin/gogs
'' + ''
mkdir $data
cp -R $src/{public,templates} $data
wrapProgram $bin/bin/gogs \
--prefix PATH : ${makeBinPath [ bash git gzip openssh ]} \
--run 'export GOGS_WORK_DIR=''${GOGS_WORK_DIR:-$PWD}' \
--run 'mkdir -p "$GOGS_WORK_DIR" && cd "$GOGS_WORK_DIR"' \
--run "ln -fs $data/{public,templates} ."
'';
goPackagePath = "github.com/gogits/gogs";
meta = {
description = "A painless self-hosted Git service";
homepage = https://gogs.io;
license = licenses.mit;
maintainers = [ maintainers.schneefux ];
};
}