mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
yuicompressor: add bin wrapper for jar
yuicompressor is a JavaScript and CSS minifier, distributed as a jar file. This change uses `makeWrapper` to create a corresponding bin script, adding `jre` as a dependency.
This commit is contained in:
parent
b8b7832219
commit
ea0f8fbd53
1 changed files with 6 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl }:
|
||||
{ stdenv, fetchurl, makeWrapper, jre }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "yuicompressor";
|
||||
|
@ -8,6 +8,8 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "1qjxlak9hbl9zd3dl5ks0w4zx5z64wjsbk7ic73r1r45fasisdrh";
|
||||
};
|
||||
|
||||
buildInputs = [makeWrapper jre];
|
||||
|
||||
meta = {
|
||||
description = "A JavaScript and CSS minifier";
|
||||
maintainers = [ stdenv.lib.maintainers.jwiegley ];
|
||||
|
@ -17,7 +19,9 @@ stdenv.mkDerivation rec {
|
|||
};
|
||||
|
||||
buildCommand = ''
|
||||
mkdir -p $out/lib
|
||||
mkdir -p $out/{bin,lib}
|
||||
ln -s $src $out/lib/yuicompressor.jar
|
||||
makeWrapper ${jre}/bin/java $out/bin/${name} --add-flags \
|
||||
"-cp $out/lib/yuicompressor.jar com.yahoo.platform.yui.compressor.YUICompressor"
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue