2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, makeWrapper, jre }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "yuicompressor";
|
|
|
|
version = "2.4.8";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/yui/yuicompressor/releases/download/v${version}/${pname}-${version}.jar";
|
|
|
|
sha256 = "1qjxlak9hbl9zd3dl5ks0w4zx5z64wjsbk7ic73r1r45fasisdrh";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ jre ];
|
|
|
|
|
|
|
|
buildCommand = ''
|
|
|
|
mkdir -p $out/{bin,lib}
|
|
|
|
ln -s $src $out/lib/yuicompressor.jar
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/yuicompressor --add-flags \
|
|
|
|
"-cp $out/lib/yuicompressor.jar com.yahoo.platform.yui.compressor.YUICompressor"
|
|
|
|
'';
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "JavaScript and CSS minifier";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "yuicompressor";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://yui.github.io/yuicompressor/";
|
2022-06-16 17:23:12 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ jwiegley ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|