summary refs log tree commit diff
diff options
context:
space:
mode:
authorHlöðver Sigurðsson <hlolli@gmail.com>2020-02-12 12:50:50 +0100
committerGitHub <noreply@github.com>2020-02-12 11:50:50 +0000
commit91801c0b45e2d667a77c7ce4332ec30a0715d036 (patch)
treef6c9245c9010db594769cd30e7839da9335168b8
parent9fb6c2b6d5aade1ccf866f00d23fcd9426f7da97 (diff)
downloadnixpkgs-91801c0b45e2d667a77c7ce4332ec30a0715d036.tar
nixpkgs-91801c0b45e2d667a77c7ce4332ec30a0715d036.tar.gz
nixpkgs-91801c0b45e2d667a77c7ce4332ec30a0715d036.tar.bz2
nixpkgs-91801c0b45e2d667a77c7ce4332ec30a0715d036.tar.lz
nixpkgs-91801c0b45e2d667a77c7ce4332ec30a0715d036.tar.xz
nixpkgs-91801c0b45e2d667a77c7ce4332ec30a0715d036.tar.zst
nixpkgs-91801c0b45e2d667a77c7ce4332ec30a0715d036.zip
clojure 1.10.1.492 -> 1.10.1.507 plus bugfix (#79868)
-rw-r--r--pkgs/development/interpreters/clojure/TDEPS-150.patch23
-rw-r--r--pkgs/development/interpreters/clojure/default.nix40
2 files changed, 48 insertions, 15 deletions
diff --git a/pkgs/development/interpreters/clojure/TDEPS-150.patch b/pkgs/development/interpreters/clojure/TDEPS-150.patch
new file mode 100644
index 00000000000..611134e8e3f
--- /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 8187bf4af8e..01fba17f104 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/;