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