Merge pull request #32700 from alesguzik/clojure-update

clojure: 1.8.0 -> 1.9.0.273
This commit is contained in:
Graham Christensen 2017-12-15 07:54:44 -05:00 committed by GitHub
commit e545356a87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,23 +1,25 @@
{ stdenv, fetchurl, unzip, ant, jdk, makeWrapper }:
{ stdenv, fetchurl, jdk, makeWrapper }:
let version = "1.8.0"; in
let version = "1.9.0.273"; in
stdenv.mkDerivation {
name = "clojure-${version}";
src = fetchurl {
url = "http://repo1.maven.org/maven2/org/clojure/clojure/${version}/clojure-${version}.zip";
sha256 = "1nip095fz5c492sw15skril60i1vd21ibg6szin4jcvyy3xr6cym";
url = "https://download.clojure.org/install/clojure-tools-${version}.tar.gz";
sha256 = "0xmrq3xvr002jgq8m1j0y5ld0rcr49608g3gqxgyxzjqswacglb4";
};
buildInputs = [ unzip ant jdk makeWrapper ];
buildPhase = "ant jar";
buildInputs = [ jdk makeWrapper ];
installPhase = ''
mkdir -p $out/share/java $out/bin
install -t $out/share/java clojure.jar
makeWrapper ${jdk.jre}/bin/java $out/bin/clojure --add-flags "-cp $out/share/java/clojure.jar clojure.main"
pwd
ls -la
mkdir -p $out/libexec $out/bin
cp -f deps.edn example-deps.edn $out
cp -f clojure-tools-${version}.jar $out/libexec
sed -i -e "s@PREFIX@$out@g" clojure
cp -f clj clojure $out/bin
'';
meta = with stdenv.lib; {