Unify the docbook-xsl and docbook-xsl-ns expressions

This commit is contained in:
Eelco Dolstra 2015-08-27 17:01:45 +02:00
parent 97cd7cfea2
commit 0ac4ad33fd
3 changed files with 44 additions and 52 deletions

View File

@ -1,31 +0,0 @@
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "docbook-xsl-ns-1.78.1";
src = fetchurl {
url = "mirror://sourceforge/docbook/${name}.tar.bz2";
sha256 = "1x3sc0axk9z3i6n0jhlsmzlmb723a4sjgslm9g12by6phirdx3ng";
};
buildPhase = "true";
installPhase =
''
dst=$out/share/xml/docbook-xsl-ns
mkdir -p $dst
rm -rf RELEASE* README* INSTALL TODO NEWS* BUGS install.sh svn* tools log Makefile tests extensions webhelp
mv * $dst/
# Backwards compatibility. Will remove eventually.
mkdir -p $out/xml/xsl
ln -s $dst $out/xml/xsl/docbook
'';
meta = {
homepage = http://wiki.docbook.org/topic/DocBookXslStylesheets;
description = "XSL stylesheets for transforming DocBook documents into HTML and various other formats";
maintainers = [ lib.maintainers.eelco ];
platforms = lib.platforms.all;
};
}

View File

@ -1,24 +1,47 @@
{ stdenv, fetchurl }:
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "docbook-xsl-1.78.1";
let
src = fetchurl {
url = "mirror://sourceforge/docbook/${name}.tar.bz2";
common = { pname, sha256 }: stdenv.mkDerivation rec {
name = "${pname}-1.78.1";
src = fetchurl {
url = "mirror://sourceforge/docbook/${name}.tar.bz2";
inherit sha256;
};
buildPhase = "true";
installPhase =
''
dst=$out/share/xml/${pname}
mkdir -p $dst
rm -rf RELEASE* README* INSTALL TODO NEWS* BUGS install.sh svn* tools log Makefile tests extensions webhelp
mv * $dst/
# Backwards compatibility. Will remove eventually.
mkdir -p $out/xml/xsl
ln -s $dst $out/xml/xsl/docbook
'';
meta = {
homepage = http://wiki.docbook.org/topic/DocBookXslStylesheets;
description = "XSL stylesheets for transforming DocBook documents into HTML and various other formats";
maintainers = [ lib.maintainers.eelco ];
platforms = lib.platforms.all;
};
};
in {
docbook_xsl = common {
pname = "docbook-xsl";
sha256 = "0rxl013ncmz1n6ymk2idvx3hix9pdabk8xn01cpcv32wmfb753y9";
};
buildPhase = "true";
docbook_xsl_ns = common {
pname = "docbook-xsl-ns";
sha256 = "1x3sc0axk9z3i6n0jhlsmzlmb723a4sjgslm9g12by6phirdx3ng";
};
installPhase =
''
dst=$out/share/xml/docbook-xsl
mkdir -p $dst
rm -rf RELEASE* README* INSTALL TODO NEWS* BUGS install.sh svn* tools log Makefile tests extensions webhelp
mv * $dst/
# Backwards compatibility. Will remove eventually.
mkdir -p $out/xml/xsl
ln -s $dst $out/xml/xsl/docbook
'';
}

View File

@ -10507,14 +10507,14 @@ let
docbook_xml_ebnf_dtd = callPackage ../data/sgml+xml/schemas/xml-dtd/docbook-ebnf { };
inherit (callPackages ../data/sgml+xml/stylesheets/xslt/docbook-xsl { })
docbook_xsl
docbook_xsl_ns;
docbook_xml_xslt = docbook_xsl;
docbook_xsl = callPackage ../data/sgml+xml/stylesheets/xslt/docbook-xsl { };
docbook5_xsl = docbook_xsl_ns;
docbook_xsl_ns = callPackage ../data/sgml+xml/stylesheets/xslt/docbook-xsl-ns { };
dosemu_fonts = callPackage ../data/fonts/dosemu-fonts { };
eb-garamond = callPackage ../data/fonts/eb-garamond { };