From: guix-patches--- via <guix-patches@gnu.org>
To: 31250@debbugs.gnu.org
Subject: [bug#31250] [PATCH] Add leiningen
Date: Wed, 26 Jul 2023 13:21:39 +0000 [thread overview]
Message-ID: <87r0oukduz.fsf@intrepidus.pl> (raw)
In-Reply-To: <cuck1swsj5z.fsf@posteo.net>
[-- Attachment #1.1: Type: text/plain, Size: 3643 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hello,
I did take a look at what Nix does and apparently one should use
lein-pkg instead of lein and perform some regexp replaces.
Here's what I have, but it doesn't work since my Guix knowledge is too
small (I added comments where appropriate, also I think it's better to
use Codeberg than GitHub):
```
(use-modules (guix)
(guix download)
((guix licenses) #:prefix license:)
(guix packages)
(guix build-system ant)
(guix build-system copy)
(gnu packages clojure)
(gnu packages wget))
(define-public leiningen-jar-standalone
;; 1. fetch https://codeberg.org/attachments/43cebda5-a7c2-405b-b641-5143a00051b5 (leiningen-2.10.0-standalone.jar)
(package
(name "leiningen-jar-standalone")
(version "2.10.0")
(source (origin
(method url-fetch)
(uri (string-append "https://codeberg.org/attachments/43cebda5-a7c2-405b-b641-5143a00051b5"))
(file-name (string-append "leiningen-" version "-standalone.jar"))
(sha256
(base32
"0d5vmpyp9ddxpj1s5c60fv2f5iimz1chbgfhchlaqxa0sfx9jwnj"))))
(build-system copy-build-system)
(home-page "https://leiningen.org")
(synopsis "Automating Clojure projects without setting your hair on fire")
(description "Leiningen is the easiest way to use Clojure. With a focus
on project automation and declarative configuration, it gets out of your way
and lets you focus on your code.")
(license license:epl1.0)))
(define-public leiningen
(package
(name "leiningen")
(version "2.10.0")
(source (origin
(method url-fetch/tarbomb)
;; https://codeberg.org/leiningen/leiningen/archive/2.10.0.zip
(uri (string-append
"https://codeberg.org/leiningen/"
name "/archive/" version ".tar.gz"))
(sha256
(base32
"0hxp8qlxcn7svskvvhalyk0ajaqd56nma03vq96w7d2ajghdn13b"))))
(build-system ant-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(delete 'configure)
(delete 'build)
(delete 'check)
;; TODO
;; 2. replace 'LEIN_JAR=/usr/share/java/leiningen-$LEIN_VERSION-standalone.jar' "LEIN_JAR=$out/share/$JARNAME"
;; 3 . wrapProgram $out/bin/lein
;; --prefix PATH ":" "${lib.makeBinPath [ rlwrap coreutils ]}"
;; --set LEIN_GPG ${gnupg}/bin/gpg
;; --set JAVA_CMD ${jdk}/bin/java
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(install-file (string-append
,name "/bin/lein-pkg")
(string-append
(assoc-ref outputs "out") "/bin/lein")))))))
(native-inputs (list leiningen-jar-standalone))
;; (build-inputs (list clojure clojure-tools))
(home-page "https://leiningen.org")
(synopsis "Automating Clojure projects without setting your hair on fire")
(description "Leiningen is the easiest way to use Clojure. With a focus
on project automation and declarative configuration, it gets out of your way
and lets you focus on your code.")
(license license:epl1.0)))
leiningen
```
-----BEGIN PGP SIGNATURE-----
iIMEARYIACsWIQQeBFZmqKTSqjEi1nTzlEDXxNbhWAUCZMEd1A0cY2dlbmllQHBt
Lm1lAAoJEPOUQNfE1uFYOFwBAJ2bDsW2vrysvvcWLgwpOCpz0wKvNGYSdFA/9ZJv
aNsOAQCBI3BQxW7ZDU4moGSaw/27n1k6oKP90PVID8J+RojHDg==
=5cDc
-----END PGP SIGNATURE-----
[-- Attachment #1.2: publickey - cgenie@pm.me - 9cc42b0a.asc --]
[-- Type: application/pgp-keys, Size: 681 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]
prev parent reply other threads:[~2023-07-26 15:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-24 15:44 [bug#31250] [PATCH] Add leiningen Charlie Ritter
2018-04-25 20:54 ` Ludovic Courtès
2018-04-26 12:41 ` Nils Gillmann
2018-04-27 5:16 ` Pjotr Prins
2018-04-28 20:44 ` Ludovic Courtès
2023-07-26 13:21 ` guix-patches--- via [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r0oukduz.fsf@intrepidus.pl \
--to=guix-patches@gnu.org \
--cc=31250@debbugs.gnu.org \
--cc=cgenie@pm.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).