forked from mirrors/nixpkgs
Added jing package (RELAX NG validation) and jing-tools for invoking the Java application
svn path=/nixpkgs/trunk/; revision=1508
This commit is contained in:
parent
f8718c601f
commit
09e3335664
|
@ -77,6 +77,11 @@ rec {
|
|||
inherit fetchurl stdenv python libxml2;
|
||||
};
|
||||
|
||||
jing_tools = (import ../tools/text/xml/jing/jing-script.nix) {
|
||||
inherit fetchurl stdenv unzip;
|
||||
j2re = blackdown;
|
||||
};
|
||||
|
||||
gnutar = (import ../tools/archivers/gnutar) {
|
||||
inherit fetchurl stdenv;
|
||||
};
|
||||
|
|
13
pkgs/tools/text/xml/jing/default.nix
Normal file
13
pkgs/tools/text/xml/jing/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{stdenv, fetchurl, unzip} :
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "jing-20030619";
|
||||
builder = ./unzip-builder.sh;
|
||||
|
||||
src = fetchurl {
|
||||
url = http://www.thaiopensource.com/download/jing-20030619.zip;
|
||||
md5 = "f9b0775d8740f16ab3df82ad3707a093";
|
||||
};
|
||||
|
||||
inherit unzip;
|
||||
}
|
12
pkgs/tools/text/xml/jing/jing-script.nix
Normal file
12
pkgs/tools/text/xml/jing/jing-script.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{stdenv, fetchurl, j2re, unzip} :
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "jing-tools";
|
||||
builder = ./script-builder.sh;
|
||||
|
||||
jing = (import ./default.nix) {
|
||||
inherit stdenv fetchurl unzip;
|
||||
};
|
||||
|
||||
inherit j2re;
|
||||
}
|
14
pkgs/tools/text/xml/jing/script-builder.sh
Normal file
14
pkgs/tools/text/xml/jing/script-builder.sh
Normal file
|
@ -0,0 +1,14 @@
|
|||
. $stdenv/setup || exit 1
|
||||
|
||||
mkdir -p $out/bin || exit 1
|
||||
|
||||
cat >> $out/bin/jing <<EOF
|
||||
#! /bin/sh
|
||||
|
||||
export JAVA_HOME=$j2re
|
||||
export LANG="en_US"
|
||||
|
||||
$j2re/bin/java -jar $jing/bin/jing.jar \$@
|
||||
EOF
|
||||
|
||||
chmod a+x $out/bin/jing || exit 1
|
6
pkgs/tools/text/xml/jing/unzip-builder.sh
Executable file
6
pkgs/tools/text/xml/jing/unzip-builder.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
set -e
|
||||
. $stdenv/setup
|
||||
|
||||
$unzip/bin/unzip $src
|
||||
mkdir -p $out
|
||||
mv $name/* $out
|
Loading…
Reference in a new issue