mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-04 14:00:04 +00:00
46 lines
809 B
Nix
46 lines
809 B
Nix
{
|
|
lib,
|
|
stdenv,
|
|
unzip,
|
|
fetchurl,
|
|
findXMLCatalogs,
|
|
src ? fetchurl {
|
|
inherit hash url;
|
|
},
|
|
version,
|
|
hash ? "",
|
|
url ? "https://www.oasis-open.org/docbook/xml/${version}/docbook-xml-${version}.zip",
|
|
postInstall ? "true",
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
inherit version src postInstall;
|
|
pname = "docbook-xml";
|
|
|
|
nativeBuildInputs = [ unzip ];
|
|
propagatedNativeBuildInputs = [ findXMLCatalogs ];
|
|
|
|
strictDeps = true;
|
|
|
|
unpackPhase = ''
|
|
runHook preUnpack
|
|
mkdir -p $out/xml/dtd/docbook
|
|
cd $out/xml/dtd/docbook
|
|
unpackFile $src
|
|
runHook postUnpack
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
find . -type f -exec chmod -x {} \;
|
|
runHook postInstall
|
|
'';
|
|
|
|
__structuredAttrs = true;
|
|
|
|
meta = {
|
|
branch = version;
|
|
platforms = lib.platforms.unix;
|
|
};
|
|
}
|