adding w3c CSS validator
svn path=/nixpkgs/trunk/; revision=19635
This commit is contained in:
parent
f8df44abb1
commit
41030334dd
79
pkgs/tools/misc/w3c-css-validator/default.nix
Normal file
79
pkgs/tools/misc/w3c-css-validator/default.nix
Normal file
|
@ -0,0 +1,79 @@
|
|||
args: with args;
|
||||
|
||||
let
|
||||
|
||||
inherit (args.stdenv) lib;
|
||||
|
||||
sources = [
|
||||
(fetchurl {
|
||||
name = "jigsaw_2.2.6.tar.gz";
|
||||
url="http://jigsaw.w3.org/Distrib/jigsaw_2.2.6.tar.gz";
|
||||
sha256 = "01cjpqjcs8gbvvzy0f488cb552f9b38hvwr97wydglrzndmcwypd";
|
||||
})
|
||||
(fetchurl {
|
||||
name = "commons-collectionurl3.2.1-bin.tar.gz";
|
||||
url="http://www.apache.org/dist/commons/collections/binaries/commons-collections-3.2.1-bin.tar.gz";
|
||||
sha256 = "7843f8307495b2be446353b10c25218793b776fa3e22615a1f50f067d81713ce";
|
||||
})
|
||||
(fetchurl {
|
||||
name = "commons-lang-2.4-bin.tar.gz";
|
||||
url="http://www.apache.org/dist/commons/lang/binaries/commons-lang-2.4-bin.tar.gz";
|
||||
sha256 = "0phwlgnvwj3n3j1aka2pkm0biacvgs72qc0ldir6s69i9qbv7rh0";
|
||||
})
|
||||
|
||||
(fetchurl {
|
||||
name = "velocity-1.6.1.tar.gz";
|
||||
url="http://www.apache.org/dist/velocity/engine/1.6.1/velocity-1.6.1.tar.gz";
|
||||
sha256 = "125s8yp8whx947kahm902wc49ms44knxdj6yfskhpk0a8h0rz9jm";
|
||||
})
|
||||
(fetchurl {
|
||||
name = "Xerces-J-bin.2.9.1.tar.gz";
|
||||
url="http://www.apache.org/dist/xerces/j/Xerces-J-bin.2.9.1.tar.gz";
|
||||
sha256 = "1xlrrznfgdars0a9m9z5k9q8arbqskdfdfjx4s0pp52wn3r0gbns";
|
||||
})
|
||||
];
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "w3c-css-validator";
|
||||
|
||||
# REGION AUTO UPDATE: { name="w3c-css-validator"; type="cvs"; cvsRoot=":pserver:anonymous:anonymous@dev.w3.org:/sources/public"; module="2002/css-validator"; }
|
||||
src = sourceFromHead "w3c-css-validator-F_17-52-37.tar.gz"
|
||||
(fetchurl { url = "http://mawercer.de/~nix/repos/w3c-css-validator-F_17-52-37.tar.gz"; sha256 = "b6f05d4812eaa464906d101242689effa8b5516d32d6420315740a77d8ee11fd"; });
|
||||
# END
|
||||
|
||||
buildInputs = [apacheAnt];
|
||||
|
||||
# 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
|
||||
${ lib.concatStringsSep "\n" (map (src: "tar xfz ${src} -C tmp") sources) }
|
||||
sed -i -e 's@<property name="servlet.lib" value=".*"/>@<property name="servlet.lib" value="${tomcat}/lib/servlet-api.jar"/>@' \
|
||||
-e '/dest="tmp\//d' \
|
||||
-e '/untar/d' \
|
||||
build.xml
|
||||
ant
|
||||
ensureDir $out/{bin,lib}
|
||||
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 = {
|
||||
description = "w3c CSS validator";
|
||||
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 = "w3c"; # http://www.w3.org/Consortium/Legal/
|
||||
maintainers = [args.lib.maintainers.marcweber];
|
||||
platforms = args.lib.platforms.linux;
|
||||
};
|
||||
}
|
|
@ -1672,6 +1672,11 @@ let
|
|||
inherit fetchurl stdenv automake autoconf libtool;
|
||||
};
|
||||
|
||||
w3cCSSValidator = import ../tools/misc/w3c-css-validator {
|
||||
inherit fetchurl stdenv apacheAnt jre sourceFromHead;
|
||||
tomcat = tomcat6;
|
||||
};
|
||||
|
||||
wdfs = import ../tools/filesystems/wdfs {
|
||||
inherit stdenv fetchurl neon fuse pkgconfig glib;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue