nixpkgs/pkgs/development/tools/yuicompressor/default.nix

30 lines
883 B
Nix
Raw Normal View History

{ stdenv, fetchurl, makeWrapper, jre }:
2014-05-27 09:13:07 +00:00
stdenv.mkDerivation rec {
pname = "yuicompressor";
2014-05-27 09:13:07 +00:00
version = "2.4.8";
2018-05-24 08:10:06 +00:00
2014-05-27 09:13:07 +00:00
src = fetchurl {
url = "https://github.com/yui/yuicompressor/releases/download/v${version}/${pname}-${version}.jar";
2014-05-27 09:13:07 +00:00
sha256 = "1qjxlak9hbl9zd3dl5ks0w4zx5z64wjsbk7ic73r1r45fasisdrh";
};
2018-05-24 08:10:06 +00:00
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jre ];
2014-05-27 09:13:07 +00:00
buildCommand = ''
mkdir -p $out/{bin,lib}
2014-05-27 09:13:07 +00:00
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"
2014-05-27 09:13:07 +00:00
'';
2018-05-24 08:10:06 +00: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 09:13:07 +00:00
}