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