GNU bug report logs -
#31250
[PATCH] Add leiningen
Previous Next
Reported by: Charlie Ritter <chewzerita <at> posteo.net>
Date: Tue, 24 Apr 2018 15:46:02 UTC
Severity: normal
Tags: moreinfo, patch
Done: Steve George <steve <at> futurile.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
-----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-----
[publickey - cgenie@pm.me - 9cc42b0a.asc (application/pgp-keys, attachment)]
[signature.asc (application/pgp-signature, attachment)]
This bug report was last modified 208 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.