2010-07-28 19:01:17 +01:00
{ stdenv , fetchurl , sourceFromHead , apacheAnt , tomcat , jre }:
2010-01-24 15:39:42 +00:00
let
2010-07-28 19:01:17 +01:00
sources =
[ ( fetchurl {
2010-01-24 15:39:42 +00:00
name = " j i g s a w _ 2 . 2 . 6 . t a r . g z " ;
url = " h t t p : / / j i g s a w . w 3 . o r g / D i s t r i b / j i g s a w _ 2 . 2 . 6 . t a r . g z " ;
sha256 = " 0 1 c j p q j c s 8 g b v v z y 0 f 4 8 8 c b 5 5 2 f 9 b 3 8 h v w r 9 7 w y d g l r z n d m c w y p d " ;
} )
( fetchurl {
name = " c o m m o n s - c o l l e c t i o n u r l 3 . 2 . 1 - b i n . t a r . g z " ;
url = " h t t p : / / w w w . a p a c h e . o r g / d i s t / c o m m o n s / c o l l e c t i o n s / b i n a r i e s / c o m m o n s - c o l l e c t i o n s - 3 . 2 . 1 - b i n . t a r . g z " ;
sha256 = " 7 8 4 3 f 8 3 0 7 4 9 5 b 2 b e 4 4 6 3 5 3 b 1 0 c 2 5 2 1 8 7 9 3 b 7 7 6 f a 3 e 2 2 6 1 5 a 1 f 5 0 f 0 6 7 d 8 1 7 1 3 c e " ;
} )
( fetchurl {
name = " c o m m o n s - l a n g - 2 . 4 - b i n . t a r . g z " ;
url = " h t t p : / / w w w . a p a c h e . o r g / d i s t / c o m m o n s / l a n g / b i n a r i e s / c o m m o n s - l a n g - 2 . 4 - b i n . t a r . g z " ;
sha256 = " 0 p h w l g n v w j 3 n 3 j 1 a k a 2 p k m 0 b i a c v g s 7 2 q c 0 l d i r 6 s 6 9 i 9 q b v 7 r h 0 " ;
} )
( fetchurl {
name = " v e l o c i t y - 1 . 6 . 1 . t a r . g z " ;
url = " h t t p : / / w w w . a p a c h e . o r g / d i s t / v e l o c i t y / e n g i n e / 1 . 6 . 1 / v e l o c i t y - 1 . 6 . 1 . t a r . g z " ;
sha256 = " 1 2 5 s 8 y p 8 w h x 9 4 7 k a h m 9 0 2 w c 4 9 m s 4 4 k n x d j 6 y f s k h p k 0 a 8 h 0 r z 9 j m " ;
} )
( fetchurl {
name = " X e r c e s - J - b i n . 2 . 9 . 1 . t a r . g z " ;
url = " h t t p : / / w w w . a p a c h e . o r g / d i s t / x e r c e s / j / X e r c e s - J - b i n . 2 . 9 . 1 . t a r . g z " ;
sha256 = " 1 x l r r z n f g d a r s 0 a 9 m 9 z 5 k 9 q 8 a r b q s k d f d f j x 4 s 0 p p 5 2 w n 3 r 0 g b n s " ;
} )
] ;
in
2010-07-28 19:01:17 +01:00
stdenv . mkDerivation {
2010-01-24 15:39:42 +00:00
name = " w 3 c - c s s - v a l i d a t o r " ;
# REGION AUTO UPDATE: { name="w3c-css-validator"; type="cvs"; cvsRoot=":pserver:anonymous:anonymous@dev.w3.org:/sources/public"; module="2002/css-validator"; }
src = sourceFromHead " w 3 c - c s s - v a l i d a t o r - F _ 1 7 - 5 2 - 3 7 . t a r . g z "
( fetchurl { url = " h t t p : / / m a w e r c e r . d e / ~ n i x / r e p o s / w 3 c - c s s - v a l i d a t o r - F _ 1 7 - 5 2 - 3 7 . t a r . g z " ; sha256 = " b 6 f 0 5 d 4 8 1 2 e a a 4 6 4 9 0 6 d 1 0 1 2 4 2 6 8 9 e f f a 8 b 5 5 1 6 d 3 2 d 6 4 2 0 3 1 5 7 4 0 a 7 7 d 8 e e 1 1 f d " ; } ) ;
# END
2010-07-28 19:01:17 +01:00
buildInputs = [ apacheAnt ] ;
2010-01-24 15:39:42 +00:00
# prepare target downloads dependency .tar.gz into tmp
# note: There is a .war as well which could be deployed to tomcat
installPhase = ''
cd css-validator
mkdir tmp
2010-07-28 19:01:17 +01:00
$ { stdenv . lib . concatStringsSep " \n " ( map ( src : " t a r x f z ${ src } - C t m p " ) sources ) }
2010-01-24 15:39:42 +00:00
sed - i - e ' s @ < property name = " s e r v l e t . l i b " value = " . * " / > @ < property name = " s e r v l e t . l i b " value = " ${ tomcat } / l i b / s e r v l e t - a p i . j a r " / > @ ' \
- e ' /dest = " t m p \/ / d ' \
- e ' /untar/d ' \
build . xml
ant
2012-01-18 20:16:00 +00:00
mkdir - p $ out / { bin , lib }
2010-01-24 15:39:42 +00:00
JAR = $ out/lib/css-validator.jar
cat > > $ out/bin/css-validator < < EOF
#!/bin/sh
exec $ { jre } /bin/java - jar $ JAR " \$ @ "
EOF
chmod + x $ out/bin/css-validator
cp css-validator . jar $ out/lib
cp - r lib $ out/lib/lib
'' ;
meta = {
2010-07-28 19:01:17 +01:00
description = " W 3 C C S S v a l i d a t o r " ;
homepage = http://dev.w3.org/cvsweb/2002/css-validator/ ;
# dependencies ship their own license files
# I think all .java files are covered by this license (?)
license = " w 3 c " ; # http://www.w3.org/Consortium/Legal/
maintainers = [ stdenv . lib . maintainers . marcweber ] ;
platforms = stdenv . lib . platforms . linux ;
2013-11-04 20:07:57 +00:00
broken = true ;
2010-01-24 15:39:42 +00:00
} ;
}