add snam-babashka

This commit is contained in:
Peter Tillemans 2023-11-27 09:45:12 +01:00
parent a8713d9760
commit b18db2542b
2 changed files with 55 additions and 2 deletions

53
snam-babashka.scm Normal file
View file

@ -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

View file

@ -6,7 +6,7 @@
#:use-module (guix build-system copy) #:use-module (guix build-system copy)
#:use-module (guix download)) #:use-module (guix download))
(define-public snam-maven (define-public snam-gradle
(package (package
(name "snam-gradle") (name "snam-gradle")
(version "8.4") (version "8.4")
@ -24,4 +24,4 @@
(home-page "https://maven.apache.org/") (home-page "https://maven.apache.org/")
(license asl2.0))) (license asl2.0)))
snam-maven snam-gradle