about summary refs log tree commit diff
diff options
context:
space:
mode:
authorThiago Kenji Okada <thiagokokada@gmail.com>2023-03-17 18:54:49 +0000
committerGitHub <noreply@github.com>2023-03-17 18:54:49 +0000
commit00c794a0f46ed3cc32f4700468a2e4f9ba089a90 (patch)
treedc72e1e78267501f446a7138c35139f3657c85d6
parent10a4343d712ead39c5b8f1d34723e1eab315d803 (diff)
parentc863a1beecb42dd20dbd69f5e22fbc809aac54e2 (diff)
downloadnixlib-00c794a0f46ed3cc32f4700468a2e4f9ba089a90.tar
nixlib-00c794a0f46ed3cc32f4700468a2e4f9ba089a90.tar.gz
nixlib-00c794a0f46ed3cc32f4700468a2e4f9ba089a90.tar.bz2
nixlib-00c794a0f46ed3cc32f4700468a2e4f9ba089a90.tar.lz
nixlib-00c794a0f46ed3cc32f4700468a2e4f9ba089a90.tar.xz
nixlib-00c794a0f46ed3cc32f4700468a2e4f9ba089a90.tar.zst
nixlib-00c794a0f46ed3cc32f4700468a2e4f9ba089a90.zip
Merge pull request #221695 from thiagokokada/bump-babashka
babashka: 1.1.173 → 1.2.174
-rw-r--r--pkgs/build-support/build-graalvm-native-image/default.nix3
-rw-r--r--pkgs/development/interpreters/clojure/babashka.nix23
2 files changed, 23 insertions, 3 deletions
diff --git a/pkgs/build-support/build-graalvm-native-image/default.nix b/pkgs/build-support/build-graalvm-native-image/default.nix
index 3bf675b5d208..c3c4a7b1e57b 100644
--- a/pkgs/build-support/build-graalvm-native-image/default.nix
+++ b/pkgs/build-support/build-graalvm-native-image/default.nix
@@ -34,6 +34,9 @@ let
     "dontUnpack"
     "LC_ALL"
     "meta"
+    "buildPhase"
+    "nativeBuildInputs"
+    "installPhase"
   ];
 in
 stdenv.mkDerivation ({
diff --git a/pkgs/development/interpreters/clojure/babashka.nix b/pkgs/development/interpreters/clojure/babashka.nix
index f8fb244d54c9..04c605f29236 100644
--- a/pkgs/development/interpreters/clojure/babashka.nix
+++ b/pkgs/development/interpreters/clojure/babashka.nix
@@ -1,20 +1,30 @@
-{ lib, buildGraalvmNativeImage, fetchurl, writeScript }:
+{ lib
+, buildGraalvmNativeImage
+, graalvmCEPackages
+, removeReferencesTo
+, fetchurl
+, writeScript }:
 
 buildGraalvmNativeImage rec {
   pname = "babashka";
-  version = "1.1.173";
+  version = "1.2.174";
 
   src = fetchurl {
     url = "https://github.com/babashka/${pname}/releases/download/v${version}/${pname}-${version}-standalone.jar";
-    sha256 = "sha256-p/KGDCocTksvUwj6x5l1xUEM1OZ4pNHtXL4mTgg7JUI=";
+    sha256 = "sha256-5ZvqbOU69ZZNIT5Mh7+Cg5s+gLhOnFMSIO4ZI9t6D/8=";
   };
 
+  graalvmDrv = graalvmCEPackages.graalvm19-ce;
+
   executable = "bb";
 
+  nativeBuildInputs = [ removeReferencesTo ];
+
   extraNativeImageBuildArgs = [
     "-H:+ReportExceptionStackTraces"
     "--no-fallback"
     "--native-image-info"
+    "--enable-preview"
   ];
 
   installCheckPhase = ''
@@ -23,6 +33,13 @@ buildGraalvmNativeImage rec {
     $out/bin/bb '(vec (dedupe *input*))' <<< '[1 1 1 1 2]' | grep '[1 2]'
   '';
 
+  # As of v1.2.174, this will remove references to ${graalvmDrv}/conf/chronology,
+  # not sure the implications of this but this file is not available in
+  # graalvm19-ce anyway.
+  postInstall = ''
+    remove-references-to -t ${graalvmDrv} $out/bin/${executable}
+  '';
+
   passthru.updateScript = writeScript "update-babashka" ''
     #!/usr/bin/env nix-shell
     #!nix-shell -i bash -p curl common-updater-scripts jq