Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchurl, makeWrapper, jre }: 2 3stdenv.mkDerivation rec { 4 pname = "yuicompressor"; 5 version = "2.4.8"; 6 7 src = fetchurl { 8 url = "https://github.com/yui/yuicompressor/releases/download/v${version}/${pname}-${version}.jar"; 9 sha256 = "1qjxlak9hbl9zd3dl5ks0w4zx5z64wjsbk7ic73r1r45fasisdrh"; 10 }; 11 12 nativeBuildInputs = [ makeWrapper ]; 13 buildInputs = [ jre ]; 14 15 buildCommand = '' 16 mkdir -p $out/{bin,lib} 17 ln -s $src $out/lib/yuicompressor.jar 18 makeWrapper ${jre}/bin/java $out/bin/yuicompressor --add-flags \ 19 "-cp $out/lib/yuicompressor.jar com.yahoo.platform.yui.compressor.YUICompressor" 20 ''; 21 22 meta = with lib; { 23 description = "A JavaScript and CSS minifier"; 24 homepage = "http://yui.github.io/yuicompressor/"; 25 sourceProvenance = with sourceTypes; [ binaryBytecode ]; 26 license = licenses.bsd3; 27 maintainers = with maintainers; [ jwiegley ]; 28 platforms = platforms.all; 29 }; 30}