Skip to content

Commit

Permalink
docbook-ebnf: refactor to pkgs/by-name/
Browse files Browse the repository at this point in the history
  • Loading branch information
rc-zb committed Oct 30, 2024
1 parent c1a3310 commit daeeebf
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 27 deletions.
47 changes: 47 additions & 0 deletions pkgs/by-name/do/docbook-ebnf/package.nix
Original file line number Diff line number Diff line change
@@ -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;
};
})
26 changes: 0 additions & 26 deletions pkgs/data/sgml+xml/schemas/xml-dtd/docbook-ebnf/default.nix

This file was deleted.

2 changes: 1 addition & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit daeeebf

Please sign in to comment.