anchor.diff:      homepage = "https://github.com/babashka/babashka";
       changelog = "https://github.com/babashka/babashka/blob/v${version}/CHANGELOG.md";
       license = licenses.epl10;
  -    platforms = graalvm11-ce.meta.platforms;
       maintainers = with maintainers; [
         bandresen
         bhougland
  
positive.code:     sha256 = "sha256-72D/HzDIxkGD4zTPE9gHf/uFtboLbNnT7CTslSlAqjc=";
    };
  
    dontUnpack = true;
  
    nativeBuildInputs = [ graalvm11-ce glibcLocales ];
  
    LC_ALL = "en_US.UTF-8";
    BABASHKA_JAR = src;
    BABASHKA_BINARY = "bb";
    BABASHKA_XMX = "-J-Xmx4500m";
  
    buildPhase = ''
      runHook preBuild
  
      # https://github.com/babashka/babashka/blob/v0.6.2/script/compile#L41-L52
      args=("-jar" "$BABASHKA_JAR"
            "-H:CLibraryPath=${graalvm11-ce.lib}/lib"
            # Required to build babashka on darwin. Do not remove.
            "${lib.optionalString stdenv.isDarwin "-H:-CheckToolchain"}"
            "-H:Name=$BABASHKA_BINARY"
            "-H:+ReportExceptionStackTraces"
            # "-H:+PrintAnalysisCallTree"
            # "-H:+DashboardAll"
            # "-H:DashboardDump=reports/dump"
            # "-H:+DashboardPretty"
            # "-H:+DashboardJson"
            "--verbose"
            "--no-fallback"
            "--native-image-info"
            "$BABASHKA_XMX")
  
       native-image ''${args[@]}
  
       runHook postBuild
    '';
  
    installPhase = ''
      runHook preInstall
  
      mkdir -p $out/bin
      cp bb $out/bin/bb
  
      runHook postInstall
    '';
  
    installCheckPhase = ''
      $out/bin/bb --version | grep '${version}'
  
negative.code: { lib, buildGraalvmNativeImage, fetchurl, writeScript }:
  
  buildGraalvmNativeImage rec {
    pname = "babashka";
    version = "0.6.5";
  
  