2013-04-01 16:42:51 +01:00
|
|
|
{ stdenv, fetchurl, openssl, zlib, asciidoc, libxml2, libxslt, docbook_xml_xslt }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2014-01-19 20:42:57 +00:00
|
|
|
name = "cgit-0.10";
|
2013-04-01 16:42:51 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://git.zx2c4.com/cgit/snapshot/${name}.tar.xz";
|
2014-01-19 20:42:57 +00:00
|
|
|
sha256 = "0ynywva0lrsasdm3nlk3dmd8k5bnrd9qlvmk4n42dfw9g1xj5i4h";
|
2013-04-01 16:42:51 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
# cgit is is tightly coupled with git and needs a git source tree to build.
|
2014-01-19 20:42:57 +00:00
|
|
|
# The cgit-0.10 Makefile has GIT_VER = 1.8.5, so use that version.
|
2013-04-01 16:42:51 +01:00
|
|
|
# IMPORTANT: Remember to check which git version cgit needs on every version
|
|
|
|
# bump.
|
|
|
|
gitSrc = fetchurl {
|
2014-01-19 20:42:57 +00:00
|
|
|
url = https://git-core.googlecode.com/files/git-1.8.5.tar.gz;
|
|
|
|
sha256 = "08vbq8y3jx1da417hkqmrkdkysac1sqjvrjmaj1v56dmkghm43w7";
|
2013-04-01 16:42:51 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ openssl zlib asciidoc libxml2 libxslt docbook_xml_xslt ];
|
|
|
|
|
|
|
|
# Give cgit a git source tree and pass configuration parameters (as make
|
|
|
|
# variables).
|
|
|
|
preBuild = ''
|
|
|
|
mkdir -p git
|
|
|
|
tar --strip-components=1 -xf "$gitSrc" -C git
|
|
|
|
|
|
|
|
makeFlagsArray+=(prefix="$out" CGIT_SCRIPT_PATH="$out/cgit/")
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Install manpage.
|
|
|
|
postInstall = ''
|
|
|
|
# xmllint fails:
|
|
|
|
#make install-man
|
|
|
|
|
|
|
|
# bypassing xmllint works:
|
|
|
|
a2x --no-xmllint -f manpage cgitrc.5.txt
|
|
|
|
mkdir -p "$out/share/man/man5"
|
|
|
|
cp cgitrc.5 "$out/share/man/man5"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://git.zx2c4.com/cgit/about/;
|
|
|
|
description = "Web frontend for git repositories";
|
|
|
|
license = stdenv.lib.licenses.gpl2;
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ bjornfor ];
|
|
|
|
};
|
|
|
|
}
|