diff options
author | Anderson Torres <torres.anderson.85@protonmail.com> | 2020-03-30 17:44:40 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-30 17:44:40 -0300 |
commit | b310f564c27be7569c934a4435779072484a3594 (patch) | |
tree | 0d854969285c97e4bae8fed277ecf3fd8058e42e /pkgs/tools/misc | |
parent | 97f404147ebd9e4ebfe8fa6aa0e493ef9857aeb5 (diff) | |
parent | a01db4abd4c6eb4e611a30de59dfd3917bb429f8 (diff) | |
download | nixlib-b310f564c27be7569c934a4435779072484a3594.tar nixlib-b310f564c27be7569c934a4435779072484a3594.tar.gz nixlib-b310f564c27be7569c934a4435779072484a3594.tar.bz2 nixlib-b310f564c27be7569c934a4435779072484a3594.tar.lz nixlib-b310f564c27be7569c934a4435779072484a3594.tar.xz nixlib-b310f564c27be7569c934a4435779072484a3594.tar.zst nixlib-b310f564c27be7569c934a4435779072484a3594.zip |
Merge pull request #80788 from DerGuteMoritz/babashka
babashka: init at 0.0.71
Diffstat (limited to 'pkgs/tools/misc')
-rw-r--r-- | pkgs/tools/misc/babashka/default.nix | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/pkgs/tools/misc/babashka/default.nix b/pkgs/tools/misc/babashka/default.nix new file mode 100644 index 000000000000..bef5c334c7c6 --- /dev/null +++ b/pkgs/tools/misc/babashka/default.nix @@ -0,0 +1,55 @@ +{ stdenv, fetchurl, graalvm8 } : + +stdenv.mkDerivation rec { + pname = "babashka"; + version = "0.0.71"; + + src = fetchurl { + url = "https://github.com/borkdude/babashka/releases/download/v${version}/babashka-${version}-standalone.jar"; + sha256 = "0gyahrxrvyfkvqg4dhzx81mg2hw56ji3aa1yxb9ycwa5bawb6080"; + }; + + reflectionJson = fetchurl { + url = "https://github.com/borkdude/babashka/releases/download/v${version}/reflection.json"; + sha256 = "13p1yw27sjvfi130pw7m9c1yzdgh7wxh8r6z8b4qmr3iifidfrcr"; + }; + + dontUnpack = true; + + buildInputs = [ graalvm8 ]; + + buildPhase = '' + native-image \ + -jar ${src} \ + -H:Name=bb \ + -H:+ReportExceptionStackTraces \ + -J-Dclojure.spec.skip-macros=true \ + -J-Dclojure.compiler.direct-linking=true \ + "-H:IncludeResources=BABASHKA_VERSION" \ + "-H:IncludeResources=SCI_VERSION" \ + -H:ReflectionConfigurationFiles=${reflectionJson} \ + --initialize-at-run-time=java.lang.Math\$RandomNumberGeneratorHolder \ + --initialize-at-build-time \ + -H:Log=registerResource: \ + -H:EnableURLProtocols=http,https \ + --enable-all-security-services \ + -H:+JNI \ + --verbose \ + --no-fallback \ + --no-server \ + -J-Xmx3g + ''; + + installPhase = '' + mkdir -p $out/bin + cp bb $out/bin + ''; + + meta = with stdenv.lib; { + description = "Tool for executing Clojure snippets or scripts in the same space where you would use Bash"; + homepage = "https://github.com/borkdude/babashka/"; + license = licenses.epl10; + platforms = graalvm8.meta.platforms; + maintainers = with maintainers; [ DerGuteMoritz ]; + }; +} |