From d0cd7a09992c5e7c873632e5dd984e406cb9ae51 Mon Sep 17 00:00:00 2001 From: Rodney Lorrimar Date: Tue, 5 Dec 2017 18:02:13 +0000 Subject: [PATCH 1/3] saxons: refactor common builder code Also add myself as maintainer. --- .../libraries/java/saxon/default.nix | 72 ++++++++++++++----- .../libraries/java/saxon/default8.nix | 26 ------- .../libraries/java/saxon/unzip-builder.sh | 6 -- pkgs/top-level/all-packages.nix | 6 +- 4 files changed, 58 insertions(+), 52 deletions(-) delete mode 100644 pkgs/development/libraries/java/saxon/default8.nix delete mode 100755 pkgs/development/libraries/java/saxon/unzip-builder.sh diff --git a/pkgs/development/libraries/java/saxon/default.nix b/pkgs/development/libraries/java/saxon/default.nix index fcd884f0a419..15a89761340e 100644 --- a/pkgs/development/libraries/java/saxon/default.nix +++ b/pkgs/development/libraries/java/saxon/default.nix @@ -1,22 +1,60 @@ -{ stdenv, fetchurl, unzip }: +{ stdenv, fetchurl, unzip, jre }: -stdenv.mkDerivation { - name = "saxon-6.5.3"; - builder = ./unzip-builder.sh; - src = fetchurl { - url = mirror://sourceforge/saxon/saxon6_5_3.zip; - sha256 = "0l5y3y2z4wqgh80f26dwwxwncs8v3nkz3nidv14z024lmk730vs3"; +let + common = { pname, version, src, description + , prog ? null, jar ? null, license ? stdenv.lib.licenses.mpl20 }: + stdenv.mkDerivation { + name = "${pname}-${version}"; + inherit pname version src; + + nativeBuildInputs = [ unzip ]; + + buildCommand = let + prog' = if prog == null then pname else prog; + jar' = if jar == null then pname else jar; + in '' + unzip $src -d $out + mkdir -p $out/bin $out/share $out/share/java + cp -s "$out"/*.jar "$out/share/java/" # */ + rm -rf $out/notices + mv $out/doc $out/share + cat > $out/bin/${prog'} < Date: Wed, 6 Dec 2017 03:52:20 +0000 Subject: [PATCH 2/3] saxonb_9_1: init at 9.1.0.8 saxonb_8_8 is kept as default saxonb because the newer version is not a completely compatible replacement. https://www.saxonica.com/documentation/#!changes/xslt20/8.8-9.1 --- pkgs/development/libraries/java/saxon/default.nix | 13 ++++++++++++- pkgs/top-level/all-packages.nix | 5 ++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/java/saxon/default.nix b/pkgs/development/libraries/java/saxon/default.nix index 15a89761340e..65eebfc7d611 100644 --- a/pkgs/development/libraries/java/saxon/default.nix +++ b/pkgs/development/libraries/java/saxon/default.nix @@ -47,7 +47,7 @@ in { license = stdenv.lib.licenses.mpl10; }; - saxonb = common { + saxonb_8_8 = common { pname = "saxonb"; version = "8.8"; jar = "saxon8"; @@ -57,4 +57,15 @@ in { }; description = "Complete and conformant processor of XSLT 2.0, XQuery 1.0, and XPath 2.0"; }; + + saxonb_9_1 = common { + pname = "saxonb"; + version = "9.1.0.8"; + jar = "saxon9"; + src = fetchurl { + url = mirror://sourceforge/saxon/Saxon-B/9.1.0.8/saxonb9-1-0-8j.zip; + sha256 = "1d39jdnwr3v3pzswm81zry6yikqlqy9dp2l2wmpqdiw00r5drg4j"; + }; + description = "Complete and conformant processor of XSLT 2.0, XQuery 1.0, and XPath 2.0"; + }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 988e298900eb..aeb66d3fc4df 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11322,9 +11322,12 @@ with pkgs; mockobjects = callPackage ../development/libraries/java/mockobjects { }; + saxonb = saxonb_8_8; + inherit (callPackages ../development/libraries/java/saxon { }) saxon - saxonb; + saxonb_8_8 + saxonb_9_1; smack = callPackage ../development/libraries/java/smack { }; From e6f1618dbc16a9210aac9ae1631548c6d7023781 Mon Sep 17 00:00:00 2001 From: Rodney Lorrimar Date: Wed, 6 Dec 2017 03:59:20 +0000 Subject: [PATCH 3/3] saxon-he: init at 9.8.0.6 --- pkgs/development/libraries/java/saxon/default.nix | 12 ++++++++++++ pkgs/top-level/all-packages.nix | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/java/saxon/default.nix b/pkgs/development/libraries/java/saxon/default.nix index 65eebfc7d611..ca9aa8fc36e8 100644 --- a/pkgs/development/libraries/java/saxon/default.nix +++ b/pkgs/development/libraries/java/saxon/default.nix @@ -68,4 +68,16 @@ in { }; description = "Complete and conformant processor of XSLT 2.0, XQuery 1.0, and XPath 2.0"; }; + + saxon-he = common { + pname = "saxon-he"; + version = "9.8.0.6"; + prog = "saxon-he"; + jar = "saxon9he"; + src = fetchurl { + url = mirror://sourceforge/saxon/Saxon-HE/9.8/SaxonHE9-8-0-6J.zip; + sha256 = "03r4djm298rxz8q7jph63h9niglrl3rifxskq1b3bclx5rgxi2lk"; + }; + description = "Processor for XSLT 3.0, XPath 2.0 and 3.1, and XQuery 3.1"; + }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index aeb66d3fc4df..0a002b5c8c0b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11327,7 +11327,8 @@ with pkgs; inherit (callPackages ../development/libraries/java/saxon { }) saxon saxonb_8_8 - saxonb_9_1; + saxonb_9_1 + saxon-he; smack = callPackage ../development/libraries/java/smack { };