2017-01-13 04:08:55 +00:00
|
|
|
{ stdenv, fetchurl, makeWrapper, jre }:
|
2014-05-27 09:13:07 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "yuicompressor";
|
|
|
|
version = "2.4.8";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://github.com/yui/yuicompressor/releases/download/v${version}/${name}-${version}.jar";
|
|
|
|
sha256 = "1qjxlak9hbl9zd3dl5ks0w4zx5z64wjsbk7ic73r1r45fasisdrh";
|
|
|
|
};
|
|
|
|
|
2017-01-13 04:08:55 +00:00
|
|
|
buildInputs = [makeWrapper jre];
|
|
|
|
|
2014-05-27 09:13:07 +00:00
|
|
|
meta = {
|
|
|
|
description = "A JavaScript and CSS minifier";
|
|
|
|
maintainers = [ stdenv.lib.maintainers.jwiegley ];
|
|
|
|
platforms = stdenv.lib.platforms.all;
|
|
|
|
homepage = http://yui.github.io/yuicompressor/;
|
|
|
|
license = stdenv.lib.licenses.bsd3;
|
|
|
|
};
|
|
|
|
|
|
|
|
buildCommand = ''
|
2017-01-13 04:08:55 +00:00
|
|
|
mkdir -p $out/{bin,lib}
|
2014-05-27 09:13:07 +00:00
|
|
|
ln -s $src $out/lib/yuicompressor.jar
|
2017-01-13 04:08:55 +00:00
|
|
|
makeWrapper ${jre}/bin/java $out/bin/${name} --add-flags \
|
|
|
|
"-cp $out/lib/yuicompressor.jar com.yahoo.platform.yui.compressor.YUICompressor"
|
2014-05-27 09:13:07 +00:00
|
|
|
'';
|
|
|
|
}
|