stgit: enable tests and install documentation (#122370)
This commit is contained in:
parent
7cb8324a91
commit
6ce887b083
1 changed files with 41 additions and 7 deletions
|
@ -1,4 +1,13 @@
|
|||
{ lib, python3Packages, fetchFromGitHub, git, installShellFiles }:
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, installShellFiles
|
||||
, python3Packages
|
||||
, asciidoc
|
||||
, docbook_xsl
|
||||
, git
|
||||
, perl
|
||||
, xmlto
|
||||
}:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "stgit";
|
||||
|
@ -11,16 +20,41 @@ python3Packages.buildPythonApplication rec {
|
|||
sha256 = "sha256-gfPf1yRmx1Mn1TyCBWmjQJBgXLlZrDcew32C9o6uNYk=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
nativeBuildInputs = [ installShellFiles asciidoc xmlto docbook_xsl ];
|
||||
|
||||
checkInputs = [ git ];
|
||||
format = "other";
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion $out/share/stgit/completion/stg.fish
|
||||
installShellCompletion --name stg $out/share/stgit/completion/stgit.bash
|
||||
installShellCompletion --name _stg $out/share/stgit/completion/stgit.zsh
|
||||
checkInputs = [ git perl ];
|
||||
|
||||
postPatch = ''
|
||||
for f in Documentation/*.xsl; do
|
||||
substituteInPlace $f \
|
||||
--replace http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl \
|
||||
${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl \
|
||||
--replace http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl \
|
||||
${docbook_xsl}/xml/xsl/docbook/html/docbook.xsl
|
||||
done
|
||||
'';
|
||||
|
||||
makeFlags = [
|
||||
"prefix=${placeholder "out"}"
|
||||
"MAN_BASE_URL=${placeholder "out"}/share/man"
|
||||
"XMLTO_EXTRA=--skip-validation"
|
||||
];
|
||||
|
||||
buildFlags = [ "all" "doc" ];
|
||||
|
||||
checkTarget = "test";
|
||||
checkFlags = [ "PERL_PATH=${perl}/bin/perl" ];
|
||||
|
||||
installTargets = [ "install" "install-doc" ];
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd stg \
|
||||
--fish $out/share/stgit/completion/stg.fish \
|
||||
--bash $out/share/stgit/completion/stgit.bash \
|
||||
--zsh $out/share/stgit/completion/stgit.zsh
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A patch manager implemented on top of Git";
|
||||
homepage = "https://stacked-git.github.io/";
|
||||
|
|
Loading…
Reference in a new issue