1 { pname, version, src, gitSrc, buildInputs ? []
2 , homepage, description, maintainers
5 { lib, stdenv, openssl, zlib, asciidoc, libxml2, libxslt
6 , docbook_xsl, pkg-config
7 , coreutils, gnused, groff, docutils
8 , gzip, bzip2, lzip, xz, zstd
13 inherit pname version src gitSrc;
17 ] ++ (with python3Packages; [ python wrapPython ]);
18 buildInputs = buildInputs ++ [
19 openssl zlib libxml2 libxslt docbook_xsl
21 pythonPath = with python3Packages; [ pygments markdown ];
24 sed -e 's|"gzip"|"${gzip}/bin/gzip"|' \
25 -e 's|"bzip2"|"${bzip2.bin}/bin/bzip2"|' \
26 -e 's|"lzip"|"${lzip}/bin/lzip"|' \
27 -e 's|"xz"|"${xz.bin}/bin/xz"|' \
28 -e 's|"zstd"|"${zstd}/bin/zstd"|' \
31 substituteInPlace filters/html-converters/man2html \
32 --replace 'groff' '${groff}/bin/groff'
34 substituteInPlace filters/html-converters/rst2html \
35 --replace 'rst2html.py' '${docutils}/bin/rst2html.py'
38 # Give cgit a git source tree and pass configuration parameters (as make
42 tar --strip-components=1 -xf "$gitSrc" -C git
47 "CGIT_SCRIPT_PATH=$(out)/cgit/"
48 "CC=${stdenv.cc.targetPrefix}cc"
49 "AR=${stdenv.cc.targetPrefix}ar"
57 # bypassing xmllint works:
58 a2x --no-xmllint -f manpage cgitrc.5.txt
59 mkdir -p "$out/share/man/man5"
60 cp cgitrc.5 "$out/share/man/man5"
62 wrapPythonProgramsIn "$out/lib/cgit/filters" "$out $pythonPath"
64 for script in $out/lib/cgit/filters/*.sh $out/lib/cgit/filters/html-converters/txt2html; do
65 wrapProgram $script --prefix PATH : '${lib.makeBinPath [ coreutils gnused ]}'
69 stripDebugList = [ "cgit" ];
71 enableParallelBuilding = true;
74 inherit homepage description;
75 license = lib.licenses.gpl2;
76 platforms = lib.platforms.linux;
77 maintainers = maintainers ++ (with lib.maintainers; [ qyliss ]);