diff --git a/pkgs/development/interpreters/clojure/TDEPS-150.patch b/pkgs/development/interpreters/clojure/TDEPS-150.patch new file mode 100644 index 000000000000..611134e8e3fa --- /dev/null +++ b/pkgs/development/interpreters/clojure/TDEPS-150.patch @@ -0,0 +1,23 @@ +--- a/clojure ++++ b/clojure +@@ -317,17 +317,17 @@ if "$stale" || "$pom"; then + tools_args+=("--threads" "$threads") + fi + if "$trace"; then + tools_args+=("--trace") + fi + fi + + # If stale, run make-classpath to refresh cached classpath +-if [[ "$stale" = true && "$describe" = false ]]; then ++if [[ "$stale" = true && "$describe" = false && -z "$force_cp" ]]; then + if "$verbose"; then + echo "Refreshing classpath" + fi + + "$JAVA_CMD" -classpath "$tools_cp" clojure.main -m clojure.tools.deps.alpha.script.make-classpath2 --config-user "$config_user" --config-project "$config_project" --libs-file "$libs_file" --cp-file "$cp_file" --jvm-file "$jvm_file" --main-file "$main_file" "${tools_args[@]}" + fi + + if "$describe"; then +-- +2.25.0 diff --git a/pkgs/development/interpreters/clojure/default.nix b/pkgs/development/interpreters/clojure/default.nix index 8187bf4af8e1..01fba17f104f 100644 --- a/pkgs/development/interpreters/clojure/default.nix +++ b/pkgs/development/interpreters/clojure/default.nix @@ -2,31 +2,41 @@ stdenv.mkDerivation rec { pname = "clojure"; - version = "1.10.1.492"; + version = "1.10.1.507"; src = fetchurl { url = "https://download.clojure.org/install/clojure-tools-${version}.tar.gz"; - sha256 = "09mhy5xw9kdr10a1xpbn5v97qyyhngw5s1n1alrs45a4m3l11iky"; + sha256 = "1k0jwa3481g3mkalwlb9gkcz9aq9zjpwmzckv823fr2d8djp41cc"; }; + patches = [ ./TDEPS-150.patch ]; + buildInputs = [ makeWrapper ]; - installPhase = let - binPath = stdenv.lib.makeBinPath [ rlwrap jdk11 ]; - in - '' - mkdir -p $out/libexec - cp clojure-tools-${version}.jar $out/libexec - cp example-deps.edn $out - cp deps.edn $out + installPhase = + let + binPath = stdenv.lib.makeBinPath [ rlwrap jdk11 ]; + in + '' + mkdir -p $out/libexec + cp clojure-tools-${version}.jar $out/libexec + cp example-deps.edn $out + cp deps.edn $out - substituteInPlace clojure --replace PREFIX $out + substituteInPlace clojure --replace PREFIX $out - install -Dt $out/bin clj clojure - wrapProgram $out/bin/clj --prefix PATH : $out/bin:${binPath} - wrapProgram $out/bin/clojure --prefix PATH : $out/bin:${binPath} - ''; + install -Dt $out/bin clj clojure + wrapProgram $out/bin/clj --prefix PATH : $out/bin:${binPath} + wrapProgram $out/bin/clojure --prefix PATH : $out/bin:${binPath} + ''; + doInstallCheck = true; + installCheckPhase = '' + CLJ_CONFIG=$out CLJ_CACHE=$out/libexec $out/bin/clojure \ + -Spath \ + -Sverbose \ + -Scp $out/libexec/clojure-tools-${version}.jar + ''; meta = with stdenv.lib; { description = "A Lisp dialect for the JVM"; homepage = https://clojure.org/;