From a506d0ac66901e67cac90fe7fdc29564a8518ce2 Mon Sep 17 00:00:00 2001 From: Tuomas Tynkkynen Date: Mon, 27 Nov 2017 20:53:13 +0200 Subject: [PATCH] docbook_xsl_*: Remove builder.sh --- .../schemas/xml-dtd/docbook-ebnf/builder.sh | 6 ------ .../schemas/xml-dtd/docbook-ebnf/default.nix | 14 +++++++++++--- .../sgml+xml/schemas/xml-dtd/docbook/builder.sh | 7 ------- .../sgml+xml/schemas/xml-dtd/docbook/generic.nix | 15 ++++++++++++--- 4 files changed, 23 insertions(+), 19 deletions(-) delete mode 100644 pkgs/data/sgml+xml/schemas/xml-dtd/docbook-ebnf/builder.sh delete mode 100644 pkgs/data/sgml+xml/schemas/xml-dtd/docbook/builder.sh diff --git a/pkgs/data/sgml+xml/schemas/xml-dtd/docbook-ebnf/builder.sh b/pkgs/data/sgml+xml/schemas/xml-dtd/docbook-ebnf/builder.sh deleted file mode 100644 index 939305d486a7..000000000000 --- a/pkgs/data/sgml+xml/schemas/xml-dtd/docbook-ebnf/builder.sh +++ /dev/null @@ -1,6 +0,0 @@ -source $stdenv/setup - -mkdir -p $out/xml/dtd/docbook-ebnf -cd $out/xml/dtd/docbook-ebnf -cp -p $dtd dbebnf.dtd -cp -p $catalog $(stripHash $catalog) 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 index e9ff03f78435..bc51ceeca431 100644 --- a/pkgs/data/sgml+xml/schemas/xml-dtd/docbook-ebnf/default.nix +++ b/pkgs/data/sgml+xml/schemas/xml-dtd/docbook-ebnf/default.nix @@ -1,16 +1,24 @@ {stdenv, fetchurl, unzip}: -assert unzip != null; - stdenv.mkDerivation { name = "docbook-xml-ebnf-1.2b1"; - builder = ./builder.sh; + dtd = fetchurl { url = http://www.docbook.org/xml/ebnf/1.2b1/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 = stdenv.lib.platforms.unix; }; diff --git a/pkgs/data/sgml+xml/schemas/xml-dtd/docbook/builder.sh b/pkgs/data/sgml+xml/schemas/xml-dtd/docbook/builder.sh deleted file mode 100644 index 8b52ebd70b44..000000000000 --- a/pkgs/data/sgml+xml/schemas/xml-dtd/docbook/builder.sh +++ /dev/null @@ -1,7 +0,0 @@ -source $stdenv/setup - -mkdir -p $out/xml/dtd/docbook -cd $out/xml/dtd/docbook -unpackFile $src -find . -type f -exec chmod -x {} \; -eval "$postInstall" diff --git a/pkgs/data/sgml+xml/schemas/xml-dtd/docbook/generic.nix b/pkgs/data/sgml+xml/schemas/xml-dtd/docbook/generic.nix index 7c3db50010cd..10b76f7b2b55 100644 --- a/pkgs/data/sgml+xml/schemas/xml-dtd/docbook/generic.nix +++ b/pkgs/data/sgml+xml/schemas/xml-dtd/docbook/generic.nix @@ -1,13 +1,22 @@ { stdenv, fetchurl, unzip, src, name, postInstall ? "true", meta ? {}, findXMLCatalogs }: -assert unzip != null; - stdenv.mkDerivation { inherit src name postInstall; - builder = ./builder.sh; + 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 = meta // { platforms = stdenv.lib.platforms.unix; };