diff --git a/pkgs/data/sgml+xml/schemas/xml-dtd/docbook-ebnf/docbook-ebnf.cat b/pkgs/by-name/do/docbook-ebnf/docbook-ebnf.cat similarity index 100% rename from pkgs/data/sgml+xml/schemas/xml-dtd/docbook-ebnf/docbook-ebnf.cat rename to pkgs/by-name/do/docbook-ebnf/docbook-ebnf.cat diff --git a/pkgs/by-name/do/docbook-ebnf/package.nix b/pkgs/by-name/do/docbook-ebnf/package.nix new file mode 100644 index 0000000000000..2ab7658d5bf5c --- /dev/null +++ b/pkgs/by-name/do/docbook-ebnf/package.nix @@ -0,0 +1,47 @@ +{ + lib, + stdenvNoCC, + fetchurl, +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "docbook-ebnf"; + version = "1.2b1"; + + src = fetchurl { + url = "https://docbook.org/xml/ebnf/${finalAttrs.version}/dbebnf.dtd"; + hash = "sha256-JfVcDXKTEaYXAFO10IljctqAi2lePJLWCL6OwnQrNlY="; + }; + catalog = builtins.path { + name = "docbook-ebnf.cat"; + path = ./docbook-ebnf.cat; + }; + + dontUnpack = true; + + installPhase = '' + runHook preInstall + + dst=$out/xml/dtd/docbook-ebnf + mkdir -p $dst + + cp -p $src $dst/$(stripHash $src) + cp -p $catalog $dst/$(stripHash $catalog) + + runHook postInstall + ''; + + meta = { + description = "DocBook EBNF module"; + longDescription = '' + The "EBNF" schema adds EBNF (Extended Backus-Naur Forms) elements elements + to DocBook. + + This is an official product of the OASIS DocBook Technical Committee. + ''; + homepage = "https://docbook.org/"; + license = lib.licenses.free; + maintainers = with lib.maintainers; [ rc-zb ]; + platforms = lib.platforms.unix; + }; +}) diff --git a/pkgs/data/sgml+xml/schemas/xml-dtd/docbook-ebnf/default.nix b/pkgs/data/sgml+xml/schemas/xml-dtd/docbook-ebnf/default.nix deleted file mode 100644 index 6be2e89dcd2ef..0000000000000 --- a/pkgs/data/sgml+xml/schemas/xml-dtd/docbook-ebnf/default.nix +++ /dev/null @@ -1,26 +0,0 @@ -{lib, stdenv, fetchurl}: - -stdenv.mkDerivation rec { - pname = "docbook-xml-ebnf"; - version = "1.2b1"; - - dtd = fetchurl { - url = "https://docbook.org/xml/ebnf/${version}/dbebnf.dtd"; - sha256 = "0min5dsc53my13b94g2yd65q1nkjcf4x1dak00bsc4ckf86mrx95"; - }; - catalog = ./docbook-ebnf.cat; - - unpackPhase = '' - mkdir -p $out/xml/dtd/docbook-ebnf - cd $out/xml/dtd/docbook-ebnf - ''; - - installPhase = '' - cp -p $dtd dbebnf.dtd - cp -p $catalog $(stripHash $catalog) - ''; - - meta = { - platforms = lib.platforms.unix; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e06f5cc823d8a..da3b82624ff6e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26837,7 +26837,7 @@ with pkgs; docbook_xml_dtd_45 = docbook_4_5; - docbook_xml_ebnf_dtd = callPackage ../data/sgml+xml/schemas/xml-dtd/docbook-ebnf { }; + docbook_xml_ebnf_dtd = docbook-ebnf; inherit (callPackages ../data/sgml+xml/stylesheets/xslt/docbook-xsl { }) docbook-xsl-nons