git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #84284 from AndersonTorres/update-babashka

babashka: 0.0.71 -> 0.0.78

commitf0959a7b0c4d9e9b51aa7e7ea32615468341ddbd authorAnderson Torres <torres.anderson.85@protonmail.com> dateSat 4 Apr 2020, 22:26 (7 years ago) parentb5a382e78cd465
4 files changed+90−57
maintainers/maintainer-list.nix+6 pkgs/development/interpreters/clojure/babashka.nix+82 pkgs/tools/misc/babashka/default.nix−55 pkgs/top-level/all-packages.nix+2−2
maintainers/maintainer-list.nix+6
@@ -981,6 +981,12 @@
981981 githubId = 2071583;
982982 name = "Benjamin Hipple";
983983 };
984+ bhougland = {
985+ email = "benjamin.hougland@gmail.com";
986+ github = "bhougland18";
987+ githubId = 28444296;
988+ name = "Benjamin Hougland";
989+ };
984990 binarin = {
985991 email = "binarin@binarin.ru";
986992 github = "binarin";
pkgs/development/interpreters/clojure/babashka.nixnew file+82
@@ -0,0 +1,82 @@
1+{ stdenv, fetchurl, graalvm8 }:
2+
3+with stdenv.lib;
4+stdenv.mkDerivation rec {
5+ pname = "babashka";
6+ version = "0.0.78";
7+
8+ reflectionJson = fetchurl {
9+ name = "reflection.json";
10+ url = "https://github.com/borkdude/${pname}/releases/download/v${version}/${pname}-${version}-reflection.json";
11+ sha256 = "1m1nwdxjsc6bkdzkbsll316ly0c3qxaimjzyfph1220irjxnm7xf";
12+ };
13+
14+ src = fetchurl {
15+ url = "https://github.com/borkdude/${pname}/releases/download/v${version}/${pname}-${version}-standalone.jar";
16+ sha256 = "01w990zk5qjrbnc846snh6na002kdyrlrfnqwg03ibx20g3mr7if";
17+ };
18+
19+ dontUnpack = true;
20+
21+ buildInputs = [ graalvm8 ];
22+
23+ buildPhase = ''
24+ native-image \
25+ -jar ${src} \
26+ -H:Name=bb \
27+ -H:+ReportExceptionStackTraces \
28+ -J-Dclojure.spec.skip-macros=true \
29+ -J-Dclojure.compiler.direct-linking=true \
30+ "-H:IncludeResources=BABASHKA_VERSION" \
31+ "-H:IncludeResources=SCI_VERSION" \
32+ -H:ReflectionConfigurationFiles=${reflectionJson} \
33+ --initialize-at-run-time=java.lang.Math\$RandomNumberGeneratorHolder \
34+ --initialize-at-build-time \
35+ -H:Log=registerResource: \
36+ -H:EnableURLProtocols=http,https \
37+ --enable-all-security-services \
38+ -H:+JNI \
39+ --verbose \
40+ --no-fallback \
41+ --no-server \
42+ --report-unsupported-elements-at-runtime \
43+ "-J-Xmx3g"
44+ '';
45+
46+ installPhase = ''
47+ mkdir -p $out/bin
48+ cp bb $out/bin/bb
49+ '';
50+
51+ meta = with stdenv.lib; {
52+ description = "A Clojure babushka for the grey areas of Bash";
53+ longDescription = ''
54+ The main idea behind babashka is to leverage Clojure in places where you
55+ would be using bash otherwise.
56+
57+ As one user described it:
58+
59+ I’m quite at home in Bash most of the time, but there’s a substantial
60+ grey area of things that are too complicated to be simple in bash, but
61+ too simple to be worth writing a clj/s script for. Babashka really
62+ seems to hit the sweet spot for those cases.
63+
64+ Goals:
65+
66+ - Low latency Clojure scripting alternative to JVM Clojure.
67+ - Easy installation: grab the self-contained binary and run. No JVM needed.
68+ - Familiarity and portability:
69+ - Scripts should be compatible with JVM Clojure as much as possible
70+ - Scripts should be platform-independent as much as possible. Babashka
71+ offers support for linux, macOS and Windows.
72+ - Allow interop with commonly used classes like java.io.File and System
73+ - Multi-threading support (pmap, future, core.async)
74+ - Batteries included (tools.cli, cheshire, ...)
75+ - Library support via popular tools like the clojure CLI
76+ '';
77+ homepage = "https://github.com/borkdude/babashka";
78+ license = licenses.epl10;
79+ platforms = graalvm8.meta.platforms;
80+ maintainers = with maintainers; [ bhougland DerGuteMoritz jlesquembre ];
81+ };
82+}
pkgs/tools/misc/babashka/default.nixdeleted−55
@@ -1,55 +0,0 @@
1−{ stdenv, fetchurl, graalvm8 } :
2−
3−stdenv.mkDerivation rec {
4− pname = "babashka";
5− version = "0.0.71";
6−
7− src = fetchurl {
8− url = "https://github.com/borkdude/babashka/releases/download/v${version}/babashka-${version}-standalone.jar";
9− sha256 = "0gyahrxrvyfkvqg4dhzx81mg2hw56ji3aa1yxb9ycwa5bawb6080";
10− };
11−
12− reflectionJson = fetchurl {
13− url = "https://github.com/borkdude/babashka/releases/download/v${version}/reflection.json";
14− sha256 = "13p1yw27sjvfi130pw7m9c1yzdgh7wxh8r6z8b4qmr3iifidfrcr";
15− };
16−
17− dontUnpack = true;
18−
19− buildInputs = [ graalvm8 ];
20−
21− buildPhase = ''
22− native-image \
23− -jar ${src} \
24− -H:Name=bb \
25− -H:+ReportExceptionStackTraces \
26− -J-Dclojure.spec.skip-macros=true \
27− -J-Dclojure.compiler.direct-linking=true \
28− "-H:IncludeResources=BABASHKA_VERSION" \
29− "-H:IncludeResources=SCI_VERSION" \
30− -H:ReflectionConfigurationFiles=${reflectionJson} \
31− --initialize-at-run-time=java.lang.Math\$RandomNumberGeneratorHolder \
32− --initialize-at-build-time \
33− -H:Log=registerResource: \
34− -H:EnableURLProtocols=http,https \
35− --enable-all-security-services \
36− -H:+JNI \
37− --verbose \
38− --no-fallback \
39− --no-server \
40− -J-Xmx3g
41− '';
42−
43− installPhase = ''
44− mkdir -p $out/bin
45− cp bb $out/bin
46− '';
47−
48− meta = with stdenv.lib; {
49− description = "Tool for executing Clojure snippets or scripts in the same space where you would use Bash";
50− homepage = "https://github.com/borkdude/babashka/";
51− license = licenses.epl10;
52− platforms = graalvm8.meta.platforms;
53− maintainers = with maintainers; [ DerGuteMoritz ];
54− };
55−}
pkgs/top-level/all-packages.nix+2−2
@@ -792,8 +792,6 @@ in
792792
793793 automirror = callPackage ../tools/misc/automirror { };
794794
795− babashka = callPackage ../tools/misc/babashka { };
796−
797795 bash-my-aws = callPackage ../tools/admin/bash-my-aws { };
798796
799797 bcachefs-tools = callPackage ../tools/filesystems/bcachefs-tools { };
@@ -9200,6 +9198,8 @@ in
92009198
92019199 angelscript_2_22 = callPackage ../development/interpreters/angelscript/2.22.nix {};
92029200
9201+ babashka = callPackage ../development/interpreters/clojure/babashka.nix { };
9202+
92039203 chibi = callPackage ../development/interpreters/chibi { };
92049204
92059205 ceptre = callPackage ../development/interpreters/ceptre { };