From b18db2542b792e471e4b09ffb6b5effc3f3fa60b Mon Sep 17 00:00:00 2001 From: Peter Tillemans Date: Mon, 27 Nov 2023 09:45:12 +0100 Subject: [PATCH] add snam-babashka --- snam-babashka.scm | 53 +++++++++++++++++++++++++++++++++++++++++++++++ snam-gradle.scm | 4 ++-- 2 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 snam-babashka.scm diff --git a/snam-babashka.scm b/snam-babashka.scm new file mode 100644 index 0000000..6d5784f --- /dev/null +++ b/snam-babashka.scm @@ -0,0 +1,53 @@ +(define-module (snam-babashka) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix utils) + #:use-module (gnu packages base) + #:use-module (gnu packages compression) + #:use-module (gnu packages gcc) + #:use-module (nonguix build-system binary)) + + +(define-public snam-babashka + (package + (name "snam-babashka") + (version "1.3.186") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/borkdude/babashka/releases/download/v" version "/babashka-" version "-linux-amd64.tar.gz")) + (sha256 + (base32 + "039ak593vmqrw3yhglfdh8rmvwj2aznwqfy6yvfca1wlk1827c3l")))) + (build-system binary-build-system) + (supported-systems '("x86_64-linux" "i686-linux")) + (arguments + `(#:patchelf-plan + `(("bb" + ("libc" "zlib" "libstdc++"))) + #:install-plan + `(("." ("bb") "bin/")) + #:phases + (modify-phases %standard-phases + ;; this is required because standard unpack expects + ;; the archive to contain a directory with everything inside it, + ;; while babashka's release .tar.gz only contains the `bb` binary. + (replace 'unpack + (lambda* (#:key inputs #:allow-other-keys) + (system* (which "tar") + "-xf" + (assoc-ref inputs "source")) + #t))))) + (inputs + `(("libstdc++" ,(make-libstdc++ gcc)) + ("zlib" ,zlib))) + (native-inputs + `(("tar" ,tar))) + (synopsis "A Clojure babushka for the grey areas of Bash") + (description + "The main idea behind babashka is to leverage Clojure in places +where you would be using bash otherwise.") + (home-page "https://github.com/borkdude/babashka") + (license license:epl1.0))) + +snam-babashka diff --git a/snam-gradle.scm b/snam-gradle.scm index e96b08c..bfe746d 100644 --- a/snam-gradle.scm +++ b/snam-gradle.scm @@ -6,7 +6,7 @@ #:use-module (guix build-system copy) #:use-module (guix download)) -(define-public snam-maven +(define-public snam-gradle (package (name "snam-gradle") (version "8.4") @@ -24,4 +24,4 @@ (home-page "https://maven.apache.org/") (license asl2.0))) -snam-maven +snam-gradle