From cb534f1baa3ab0fb0d95dfb27a8703a1ac54e62a Mon Sep 17 00:00:00 2001 From: Rickard Nilsson Date: Mon, 1 Jul 2013 14:52:57 +0200 Subject: [PATCH] New package: Google Closure compiler version 20130603. A JavaScript optimizing compiler. --- .../development/compilers/closure/default.nix | 31 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/development/compilers/closure/default.nix diff --git a/pkgs/development/compilers/closure/default.nix b/pkgs/development/compilers/closure/default.nix new file mode 100644 index 00000000000..13c9f1c0350 --- /dev/null +++ b/pkgs/development/compilers/closure/default.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchurl, jre, gnutar, bash }: + +stdenv.mkDerivation rec { + name = "closure-compiler-${version}"; + version = "20130603"; + + src = fetchurl { + url = "http://dl.google.com/closure-compiler/compiler-${version}.tar.gz"; + sha256 = "0bk0s8p9r9an5m0l8y23wjlx490k15i4zah0a384a2akzji8y095"; + }; + + phases = [ "installPhase" ]; + + buildInputs = [ gnutar ]; + + installPhase = '' + mkdir -p $out/lib/java $out/bin + tar -xzf $src + cp -r compiler.jar $out/lib/java/ + echo "#!${bash}/bin/bash" > $out/bin/closure-compiler + echo "${jre}/bin/java -jar $out/lib/java/compiler.jar \"\$@\"" >> $out/bin/closure-compiler + chmod +x $out/bin/closure-compiler + ''; + + meta = { + description = "A tool for making JavaScript download and run faster"; + homepage = https://developers.google.com/closure/compiler/; + license = stdenv.lib.licenses.asl20; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2e11edd297c..bc6545833fa 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2069,6 +2069,8 @@ let clean = callPackage ../development/compilers/clean { }; + closurecompiler = callPackage ../development/compilers/closure { }; + cmucl_binary = callPackage ../development/compilers/cmucl/binary.nix { }; cython = callPackage ../development/interpreters/cython { };