2022-05-28 15:28:44 +02:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2021-05-25 02:01:03 +02:00
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
, python3Packages
|
|
|
|
, asciidoc
|
|
|
|
, docbook_xsl
|
2021-09-28 07:49:34 +02:00
|
|
|
, docbook_xml_dtd_45
|
2021-05-25 02:01:03 +02:00
|
|
|
, git
|
|
|
|
, perl
|
|
|
|
, xmlto
|
|
|
|
}:
|
2008-07-09 18:21:03 +02:00
|
|
|
|
2020-06-27 23:54:57 +02:00
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "stgit";
|
2022-01-31 08:40:17 +01:00
|
|
|
version = "1.5";
|
2011-09-15 13:04:00 +02:00
|
|
|
|
2018-10-03 13:54:02 +02:00
|
|
|
src = fetchFromGitHub {
|
2021-04-09 15:09:27 +02:00
|
|
|
owner = "stacked-git";
|
2018-10-03 13:54:02 +02:00
|
|
|
repo = "stgit";
|
|
|
|
rev = "v${version}";
|
2022-01-31 08:40:17 +01:00
|
|
|
sha256 = "sha256-TsJr2Riygz/DZrn6UZMPvq1tTfvl3dFEZZNq2wVj1Nw=";
|
2008-07-09 18:21:03 +02:00
|
|
|
};
|
|
|
|
|
2022-09-19 04:08:49 +02:00
|
|
|
nativeBuildInputs = [ installShellFiles asciidoc xmlto docbook_xsl docbook_xml_dtd_45 python3Packages.setuptools ];
|
2011-09-15 13:04:00 +02:00
|
|
|
|
2021-05-25 02:01:03 +02:00
|
|
|
format = "other";
|
2008-07-09 18:21:03 +02:00
|
|
|
|
2023-01-21 13:00:00 +01:00
|
|
|
nativeCheckInputs = [ git perl ];
|
2021-05-25 02:01:03 +02:00
|
|
|
|
|
|
|
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
|
2021-09-28 07:49:34 +02:00
|
|
|
|
|
|
|
substituteInPlace Documentation/texi.xsl \
|
|
|
|
--replace http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd \
|
|
|
|
${docbook_xml_dtd_45}/xml/dtd/docbook/docbookx.dtd
|
|
|
|
|
|
|
|
cat > stgit/_version.py <<EOF
|
|
|
|
__version__ = "${version}"
|
|
|
|
EOF
|
2008-08-07 19:30:35 +02:00
|
|
|
'';
|
2008-07-09 18:21:03 +02:00
|
|
|
|
2021-05-25 02:01:03 +02:00
|
|
|
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" ];
|
|
|
|
|
2021-09-28 07:49:34 +02:00
|
|
|
installTargets = [ "install" "install-doc" "install-html" ];
|
2021-05-25 02:01:03 +02:00
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd stg \
|
2021-09-28 07:49:34 +02:00
|
|
|
--fish completion/stg.fish \
|
|
|
|
--bash completion/stgit.bash \
|
|
|
|
--zsh completion/stgit.zsh
|
|
|
|
'';
|
2021-05-25 02:01:03 +02:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2015-04-30 17:05:14 +02:00
|
|
|
description = "A patch manager implemented on top of Git";
|
2021-04-09 15:09:27 +02:00
|
|
|
homepage = "https://stacked-git.github.io/";
|
2021-05-07 19:04:06 +02:00
|
|
|
license = licenses.gpl2Only;
|
2018-10-03 13:54:02 +02:00
|
|
|
platforms = platforms.unix;
|
2021-05-07 19:04:06 +02:00
|
|
|
maintainers = with maintainers; [ jshholland ];
|
2008-07-09 18:21:03 +02:00
|
|
|
};
|
|
|
|
}
|