push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
{
lib,
stdenv,
fetchurl,
unzip,
}:
let
src = fetchurl {
url = "http://www.oasis-open.org/docbook/sgml/3.1/docbk31.zip";
sha256 = "0f25ch7bywwhdxb1qa0hl28mgq1blqdap3rxzamm585rf4kis9i0";
};
isoents = fetchurl {
url = "http://www.oasis-open.org/cover/ISOEnts.zip";
sha256 = "1clrkaqnvc1ja4lj8blr0rdlphngkcda3snm7b9jzvcn76d3br6w";
};
in
stdenv.mkDerivation {
name = "docbook-sgml-3.1";
dontUnpack = true;
nativeBuildInputs = [ unzip ];
installPhase = ''
o=$out/sgml/dtd/docbook-3.1
mkdir -p $o
cd $o
unzip ${src}
unzip ${isoents}
sed -e "s/iso-/ISO/" -e "s/.gml//" -i docbook.cat
'';
meta = {
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,41 @@
{
lib,
stdenv,
fetchurl,
unzip,
}:
let
src = fetchurl {
url = "http://www.oasis-open.org/docbook/sgml/4.1/docbk41.zip";
sha256 = "04b3gp4zkh9c5g9kvnywdkdfkcqx3kjc04j4mpkr4xk7lgqgrany";
};
isoents = fetchurl {
url = "https://web.archive.org/web/20250220122223/http://xml.coverpages.org/ISOEnts.zip";
sha256 = "1clrkaqnvc1ja4lj8blr0rdlphngkcda3snm7b9jzvcn76d3br6w";
};
in
stdenv.mkDerivation {
name = "docbook-sgml-4.1";
dontUnpack = true;
nativeBuildInputs = [ unzip ];
installPhase = ''
o=$out/sgml/dtd/docbook-4.1
mkdir -p $o
cd $o
unzip ${src}
unzip ${isoents}
sed -e "s/iso-/ISO/" -e "s/.gml//" -i docbook.cat
'';
meta = {
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
stdenv,
fetchurl,
unzip,
findXMLCatalogs,
}:
let
# Urgh, DocBook 4.1.2 doesn't come with an XML catalog. Use the one
# from 4.2.
docbook42catalog = fetchurl {
url = "https://docbook.org/xml/4.2/catalog.xml";
sha256 = "18lhp6q2l0753s855r638shkbdwq9blm6akdjsc9nrik24k38j17";
};
in
import ./generic.nix {
inherit
lib
stdenv
unzip
findXMLCatalogs
;
version = "4.1.2";
src = fetchurl {
url = "https://docbook.org/xml/4.1.2/docbkx412.zip";
sha256 = "0wkp5rvnqj0ghxia0558mnn4c7s3n501j99q2isp3sp0ci069w1h";
};
postInstall = "
sed 's|V4.2|V4.1.2|g' < ${docbook42catalog} > catalog.xml
";
}

View File

@@ -0,0 +1,21 @@
{
lib,
stdenv,
fetchurl,
unzip,
findXMLCatalogs,
}:
import ./generic.nix {
inherit
lib
stdenv
unzip
findXMLCatalogs
;
version = "4.2";
src = fetchurl {
url = "https://docbook.org/xml/4.2/docbook-xml-4.2.zip";
sha256 = "acc4601e4f97a196076b7e64b368d9248b07c7abf26b34a02cca40eeebe60fa2";
};
}

View File

@@ -0,0 +1,21 @@
{
lib,
stdenv,
fetchurl,
unzip,
findXMLCatalogs,
}:
import ./generic.nix {
inherit
lib
stdenv
unzip
findXMLCatalogs
;
version = "4.3";
src = fetchurl {
url = "https://docbook.org/xml/4.3/docbook-xml-4.3.zip";
sha256 = "0r1l2if1z4wm2v664sqdizm4gak6db1kx9y50jq89m3gxaa8l1i3";
};
}

View File

@@ -0,0 +1,21 @@
{
lib,
stdenv,
fetchurl,
unzip,
findXMLCatalogs,
}:
import ./generic.nix {
inherit
lib
stdenv
unzip
findXMLCatalogs
;
version = "4.4";
src = fetchurl {
url = "https://docbook.org/xml/4.4/docbook-xml-4.4.zip";
sha256 = "141h4zsyc71sfi2zzd89v4bb4qqq9ca1ri9ix2als9f4i3mmkw82";
};
}

View File

@@ -0,0 +1,21 @@
{
lib,
stdenv,
fetchurl,
unzip,
findXMLCatalogs,
}:
import ./generic.nix {
inherit
lib
stdenv
unzip
findXMLCatalogs
;
version = "4.5";
src = fetchurl {
url = "https://docbook.org/xml/4.5/docbook-xml-4.5.zip";
sha256 = "1d671lcjckjri28xfbf6dq7y3xnkppa910w1jin8rjc35dx06kjf";
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
stdenv,
unzip,
src,
version,
postInstall ? "true",
findXMLCatalogs,
}:
stdenv.mkDerivation {
inherit version src postInstall;
pname = "docbook-xml";
nativeBuildInputs = [ unzip ];
propagatedNativeBuildInputs = [ findXMLCatalogs ];
unpackPhase = ''
mkdir -p $out/xml/dtd/docbook
cd $out/xml/dtd/docbook
unpackFile $src
'';
installPhase = ''
find . -type f -exec chmod -x {} \;
runHook postInstall
'';
meta = {
branch = version;
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,10 @@
--- a/catalog.xml
+++ b/catalog.xml
@@ -5,4 +5,7 @@
<rewriteSystem systemIdStartString="http://cdn.docbook.org/release/xsl@suffix@/current/" rewritePrefix="./"/>
<rewriteURI uriStartString="http://cdn.docbook.org/release/xsl@suffix@/@version@/" rewritePrefix="./"/>
<rewriteSystem systemIdStartString="http://cdn.docbook.org/release/xsl@suffix@/@version@/" rewritePrefix="./"/>
+ <!-- legacy URIs -->
+ <rewriteURI uriStartString="http://docbook.sourceforge.net/release/xsl@legacySuffix@/current/" rewritePrefix="./"/>
+ <rewriteSystem systemIdStartString="http://docbook.sourceforge.net/release/xsl@legacySuffix@/current/" rewritePrefix="./"/>
</catalog>

View File

@@ -0,0 +1,109 @@
{
lib,
stdenv,
replaceVars,
fetchurl,
fetchpatch,
findXMLCatalogs,
writeScriptBin,
ruby,
bash,
withManOptDedupPatch ? false,
}:
let
common =
{
pname,
sha256,
suffix ? "",
}:
let
legacySuffix = lib.optionalString (suffix != "-nons") "-ns";
self = stdenv.mkDerivation rec {
inherit pname;
version = "1.79.2";
src = fetchurl {
url = "https://github.com/docbook/xslt10-stylesheets/releases/download/release%2F${version}/docbook-xsl${suffix}-${version}.tar.bz2";
inherit sha256;
};
patches = [
# Prevent a potential stack overflow
# https://github.com/docbook/xslt10-stylesheets/pull/37
(fetchpatch {
url = "https://src.fedoraproject.org/rpms/docbook-style-xsl/raw/e3ae7a97ed1d185594dd35954e1a02196afb205a/f/docbook-style-xsl-non-recursive-string-subst.patch";
sha256 = "0lrjjg5kpwwmbhkxzz6i5zmimb6lsvrrdhzc2qgjmb3r6jnsmii3";
stripLen = "1";
})
# Fix reproducibility by respecting generate.consistent.ids in indexes
# https://github.com/docbook/xslt10-stylesheets/pull/88
# https://sourceforge.net/p/docbook/bugs/1385/
(fetchpatch {
url = "https://github.com/docbook/xslt10-stylesheets/commit/07631601e6602bc49b8eac3aab9d2b35968d3e7a.patch";
sha256 = "0igfhcr6hzcydqsnjsd181h5yl3drjnrwdmxcybr236m8255vkq3";
stripLen = "1";
})
# Add legacy sourceforge.net URIs to the catalog
(replaceVars ./catalog-legacy-uris.patch {
inherit legacySuffix suffix version;
})
]
++ lib.optionals withManOptDedupPatch [
# Fixes https://github.com/NixOS/nixpkgs/issues/166304
# https://github.com/docbook/xslt10-stylesheets/pull/241
./fix-man-options-duplication.patch
];
propagatedBuildInputs = [ findXMLCatalogs ];
dontBuild = true;
installPhase = ''
dst=$out/share/xml/${pname}
mkdir -p $dst
rm -rf RELEASE* README* INSTALL TODO NEWS* BUGS install.sh tools Makefile tests extensions webhelp
mv * $dst/
# Backwards compatibility. Will remove eventually.
mkdir -p $out/xml/xsl
ln -s $dst $out/xml/xsl/docbook
# More backwards compatibility
ln -s $dst $out/share/xml/docbook-xsl${legacySuffix}
'';
passthru.dbtoepub = writeScriptBin "dbtoepub" ''
#!${bash}/bin/bash
exec -a dbtoepub ${ruby}/bin/ruby ${self}/share/xml/${pname}/epub/bin/dbtoepub "$@"
'';
meta = {
homepage = "https://github.com/docbook/wiki/wiki/DocBookXslStylesheets";
description = "XSL stylesheets for transforming DocBook documents into HTML and various other formats";
license = lib.licenses.mit;
maintainers = [ ];
platforms = lib.platforms.all;
};
};
in
self;
in
{
docbook-xsl-nons = common {
pname = "docbook-xsl-nons";
suffix = "-nons";
sha256 = "00i1hdyxim8jymv2dz68ix3wbs5w6isxm8ijb03qk3vs1g59x2zf";
};
docbook-xsl-ns = common {
pname = "docbook-xsl-ns";
sha256 = "0wd33z41kdsybyx3ay21w6bdlmgpd9kyn3mr5y520lsf8km28r9i";
};
}

View File

@@ -0,0 +1,11 @@
--- a/manpages/lists.xsl
+++ b/manpages/lists.xsl
@@ -110,7 +110,7 @@
<xsl:text>.RE&#10;</xsl:text>
</xsl:template>
-<xsl:template match="d:varlistentry/d:term"/>
+<xsl:template match="d:varlistentry/d:term" priority="1"/>
<xsl:template match="d:glossentry/d:glossterm"/>
<xsl:template match="d:variablelist[ancestor::d:listitem or ancestor::d:step or ancestor::d:glossdef]|