nixpkgs/pkgs/development/compilers/closure/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
1,009 B
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, jre, makeWrapper }:
stdenv.mkDerivation rec {
pname = "closure-compiler";
2023-11-14 07:39:30 +01:00
version = "20231112";
src = fetchurl {
url = "mirror://maven/com/google/javascript/closure-compiler/v${version}/closure-compiler-v${version}.jar";
2023-11-14 07:39:30 +01:00
sha256 = "sha256-oH1/QZX8cF9sZikP5XpNdfsMepJrgW+uX0OGHhJVbmw=";
};
2021-08-18 22:40:40 +02:00
dontUnpack = true;
2017-09-27 00:19:56 +02:00
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jre ];
installPhase = ''
2014-01-09 13:01:38 +01:00
mkdir -p $out/share/java $out/bin
2021-08-18 22:40:40 +02:00
cp ${src} $out/share/java/closure-compiler-v${version}.jar
2017-09-27 00:19:56 +02:00
makeWrapper ${jre}/bin/java $out/bin/closure-compiler \
--add-flags "-jar $out/share/java/closure-compiler-v${version}.jar"
'';
meta = with lib; {
description = "A tool for making JavaScript download and run faster";
mainProgram = "closure-compiler";
2020-03-04 19:56:56 +01:00
homepage = "https://developers.google.com/closure/compiler/";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
2017-09-27 00:19:56 +02:00
license = licenses.asl20;
platforms = platforms.all;
};
}