mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 06:01:15 +00:00
clojure: 1.8.0 -> 1.9.0.273
Clojure 1.9 adds native cli tools, which are now used instead of creating a java wrapper with a clojure.jar arguments. See https://clojure.org/guides/deps_and_cli for more details on clojure native cli tools.
This commit is contained in:
parent
7c19c219bd
commit
81f4aa72b5
|
@ -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; {
|
||||
|
|
Loading…
Reference in a new issue