Skip to content

Commit

Permalink
docbook: add versions 5.1 and 5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
rc-zb committed Oct 30, 2024
1 parent 44d9e89 commit c1a3310
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkgs/by-name/do/docbook/package.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
callPackage,
releaseVersion ? "5.0",
releaseVersion ? "5.2",
}:

(callPackage ./versions.nix { }).${releaseVersion}
57 changes: 57 additions & 0 deletions pkgs/by-name/do/docbook/versions.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,63 @@ let
era: pkgInfo: callPackage (import (lib.path.append ./. ("build-" + era + ".nix")) pkgInfo) { };
in
{
"5.2" =
(makeDocBookVersion "xml-rng" {
version = "5.2";
hash = "sha256-grMb+6HEo18TiZWr1Ofko9yf4XIX3vlSeXm/QsFpiWI=";
}).overrideAttrs
{
installPhase = ''
runHook preInstall
dst_xml=$out/share/xml/docbook-5.2
dst_doc=$out/share/doc/docbook-5.2
mkdir -p $dst_xml $dst_doc
rm -r release-notes
mv -t $dst_doc *.{docx,html,pdf}
cp -pr -t $dst_xml *
runHook postInstall
'';

fixupPhase = ''
runHook preFixup
substituteInPlace $dst_xml/catalog.xml \
--replace-fail uri=\" uri=\"$dst_xml/
runHook postFixup
'';
};
"5.1" =
(makeDocBookVersion "xml-rng" {
version = "5.1";
hash = "sha256-s/NBNlQAPB53M2DX/GDruKvQ6Mmvjn1sS1XxJPNNHn8=";
}).overrideAttrs
{
installPhase = ''
runHook preInstall
dst_xml=$out/share/xml/docbook-5.1
dst_doc=$out/share/doc/docbook-5.1
mkdir -p $dst_xml $dst_doc
cp -pr -t $dst_xml schemas/*
cp -pr -t $dst_doc *.{xml,html,pdf}
runHook postInstall
'';

fixupPhase = ''
runHook preFixup
substituteInPlace $dst_xml/catalog.xml \
--replace-fail uri=\" uri=\"$dst_xml/
runHook postFixup
'';
};
"5.0" =
(makeDocBookVersion "xml-rng" rec {
version = "5.0.1";
Expand Down
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26810,6 +26810,8 @@ with pkgs;
dm-sans = callPackage ../data/fonts/dm-sans { };
dns-root-data = callPackage ../data/misc/dns-root-data { };

docbook_5_2 = docbook.override { releaseVersion = "5.2"; };
docbook_5_1 = docbook.override { releaseVersion = "5.1"; };
docbook_5_0 = docbook.override { releaseVersion = "5.0"; };
docbook_4_5 = docbook.override { releaseVersion = "4.5"; };
docbook_4_4 = docbook.override { releaseVersion = "4.4"; };
Expand Down

0 comments on commit c1a3310

Please sign in to comment.