[PATCH] Add leiningen

OpenSubmitted by Charlie Ritter.
Details
4 participants
  • Charlie Ritter
  • Ludovic Courtès
  • Nils Gillmann
  • Pjotr Prins
Owner
unassigned
Severity
normal
C
C
Charlie Ritter wrote on 24 Apr 2018 17:44
(address . guix-patches@gnu.org)
cuck1swsj5z.fsf@posteo.net
From eac978c99ef288926530dcdee64cc9e3b7b8fe32 Mon Sep 17 00:00:00 2001From: Charlie Ritter <chewzerita@posteo.net>Date: Tue, 24 Apr 2018 11:42:39 -0400Subject: [PATCH] gnu: Add leiningen.
* gnu/packages/java.scm (leiningen): New variable.--- gnu/packages/java.scm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+)
Toggle diff (53 lines)diff --git a/gnu/packages/java.scm b/gnu/packages/java.scmindex 500f27dcf..ffbd40890 100644--- a/gnu/packages/java.scm+++ b/gnu/packages/java.scm@@ -9,6 +9,7 @@ ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com> ;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>+;;; Copyright © 2018 Charlie Ritter <chewzerita@posteo.net> ;;; ;;; This file is part of GNU Guix. ;;;@@ -1861,6 +1862,38 @@ designs.") license:asl2.0 license:cpl1.0))))) +(define-public leiningen+ (package+ (name "leiningen")+ (version "2.8.1")+ (source (origin+ (method url-fetch/tarbomb)+ (uri (string-append+ "https://github.com/technomancy/"+ name "/archive/" version ".tar.gz"))+ (sha256+ (base32+ "0hjjszxqhc9sh31dpirak3c5ws90z41ypcc16y4s1q35ydlajv3w"))))+ (build-system ant-build-system)+ (arguments+ `(#:phases+ (modify-phases %standard-phases+ (delete 'configure)+ (delete 'build)+ (delete 'check)+ (replace 'install+ (lambda* (#:key outputs #:allow-other-keys)+ (install-file (string-append+ ,name "-" ,version "/bin/lein")+ (string-append+ (assoc-ref outputs "out") "/bin")))))))+ (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 javacc (package (name "javacc")-- 2.17.0
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCAAdFiEEiNLX4rpUkGUHqgmts0r+M/VPj+8FAlrfUPkACgkQs0r+M/VPj+/UgAgAkYLqqXLOb5LKbRPGArJtelH//6g927vhN4IApkEeYG9f2vU85bAfpxi++dcJYJknWaVCRDkQ9FY508BFiVqrYVhzSvcB/f6sLE3pMKPvX4sA4/bGCM1TTuH/AfXmSiv4dkEgI2ad+m/0w+YpdeYDDMyG2O0utC84l7OvgK4PdaQAS6bfIDWkZjAZvccSRbhmL3LRIraXr9GT0Rx35QIsYjEyTUjQ2Sc07jkofKfWtAdr+8uz+QVaCFCXRIZwWMDqy3+xowO5xVJ5z8Qy0SINkX5qaJkLneaVFNB0onOyDVo/h4FIIV/whRHBorNMFhx63p0PyzemESrdf9V12u3BbQ===wkAx-----END PGP SIGNATURE-----
L
L
Ludovic Courtès wrote on 25 Apr 2018 22:54
(name . Charlie Ritter)(address . chewzerita@posteo.net)(address . 31250@debbugs.gnu.org)
87k1svovm6.fsf@gnu.org
Hello,
Charlie Ritter <chewzerita@posteo.net> skribis:
Toggle quote (7 lines)> From eac978c99ef288926530dcdee64cc9e3b7b8fe32 Mon Sep 17 00:00:00 2001> From: Charlie Ritter <chewzerita@posteo.net>> Date: Tue, 24 Apr 2018 11:42:39 -0400> Subject: [PATCH] gnu: Add leiningen.>> * gnu/packages/java.scm (leiningen): New variable.
Good to see the family of package managers *and* Lisps grow in Guix.:-)
Toggle quote (22 lines)> + (source (origin> + (method url-fetch/tarbomb)> + (uri (string-append> + "https://github.com/technomancy/"> + name "/archive/" version ".tar.gz"))> + (sha256> + (base32> + "0hjjszxqhc9sh31dpirak3c5ws90z41ypcc16y4s1q35ydlajv3w"))))> + (build-system ant-build-system)> + (arguments> + `(#:phases> + (modify-phases %standard-phases> + (delete 'configure)> + (delete 'build)> + (delete 'check)> + (replace 'install> + (lambda* (#:key outputs #:allow-other-keys)> + (install-file (string-append> + ,name "-" ,version "/bin/lein")> + (string-append> + (assoc-ref outputs "out") "/bin")))))))
Unfortunately installing the ‘lein’ script alone won’t cut it. Theissue is that, AIUI, the script downloads and installs pre-built Jars ona first run (through its ‘self_install’ function).
The policy for Guix is to build things from source. So we would have toprovide Leiningen and its dependencies as packages built from source,and to remove the auto-download functionality from the script.
That’s obviously more work. WDYT?
Thanks,Ludo’.
N
N
Nils Gillmann wrote on 26 Apr 2018 14:41
(name . Ludovic Courtès)(address . ludo@gnu.org)
20180426124132.u62mcbnxflxvjsti@abyayala
Ludovic Courtès transcribed 1.7K bytes:
Toggle quote (11 lines)> Hello,> > Charlie Ritter <chewzerita@posteo.net> skribis:> > > From eac978c99ef288926530dcdee64cc9e3b7b8fe32 Mon Sep 17 00:00:00 2001> > From: Charlie Ritter <chewzerita@posteo.net>> > Date: Tue, 24 Apr 2018 11:42:39 -0400> > Subject: [PATCH] gnu: Add leiningen.> >> > * gnu/packages/java.scm (leiningen): New variable.
Nice!
Toggle quote (29 lines)> Good to see the family of package managers *and* Lisps grow in Guix.> :-)> > > + (source (origin> > + (method url-fetch/tarbomb)> > + (uri (string-append> > + "https://github.com/technomancy/"> > + name "/archive/" version ".tar.gz"))> > + (sha256> > + (base32> > + "0hjjszxqhc9sh31dpirak3c5ws90z41ypcc16y4s1q35ydlajv3w"))))> > + (build-system ant-build-system)> > + (arguments> > + `(#:phases> > + (modify-phases %standard-phases> > + (delete 'configure)> > + (delete 'build)> > + (delete 'check)> > + (replace 'install> > + (lambda* (#:key outputs #:allow-other-keys)> > + (install-file (string-append> > + ,name "-" ,version "/bin/lein")> > + (string-append> > + (assoc-ref outputs "out") "/bin")))))))> > Unfortunately installing the ‘lein’ script alone won’t cut it. The> issue is that, AIUI, the script downloads and installs pre-built Jars on> a first run (through its ‘self_install’ function).
Yes, that's why my attempt at leiningen has been "sleeping" for a long time now...
Toggle quote (4 lines)> The policy for Guix is to build things from source. So we would have to> provide Leiningen and its dependencies as packages built from source,> and to remove the auto-download functionality from the script.
But this is on first run, not during the installation as far as I remember.So in my opinion that's not an immediate blocker for the initial package.The obvious fix afterwards is to apply the building from source.
Toggle quote (7 lines)> That’s obviously more work. WDYT?> > Thanks,> Ludo’.> > >
P
P
Pjotr Prins wrote on 27 Apr 2018 07:16
(name . Nils Gillmann)(address . ng0@n0.is)
20180427051633.fmszqyynlhvtjqt7@thebird.nl
On Thu, Apr 26, 2018 at 12:41:32PM +0000, Nils Gillmann wrote:
Toggle quote (8 lines)> > The policy for Guix is to build things from source. So we would have to> > provide Leiningen and its dependencies as packages built from source,> > and to remove the auto-download functionality from the script.> > But this is on first run, not during the installation as far as I remember.> So in my opinion that's not an immediate blocker for the initial package.> The obvious fix afterwards is to apply the building from source.
We also packaged tools like conda that download binaries when run.
Adding Leiningen may accelerate using Clojure from Guix and supportwill get better over time. Every time Rich Hickey talks aboutdeployment I am thinking he should be introduced to Guix.
Thanks for this!
Pj.
L
L
Ludovic Courtès wrote on 28 Apr 2018 22:44
(name . Pjotr Prins)(address . pjotr.public12@thebird.nl)
87bme3awnw.fsf@gnu.org
Pjotr Prins <pjotr.public12@thebird.nl> skribis:
Toggle quote (11 lines)> On Thu, Apr 26, 2018 at 12:41:32PM +0000, Nils Gillmann wrote:>> > The policy for Guix is to build things from source. So we would have to>> > provide Leiningen and its dependencies as packages built from source,>> > and to remove the auto-download functionality from the script.>> >> But this is on first run, not during the installation as far as I remember.>> So in my opinion that's not an immediate blocker for the initial package.>> The obvious fix afterwards is to apply the building from source.>> We also packaged tools like conda that download binaries when run.
True, that’s not great, and Leiningen may actually do the same thing aspart of its normal job…
I think it’s good to estimate how difficult it would be to buildLeiningen from source, and then we can decide what to do.
Ludo’.
L
L
Ludovic Courtès wrote on 5 May 2018 22:27
control message for bug #31250
(address . control@debbugs.gnu.org)
87h8nlrgq1.fsf@gnu.org
tags 31250 moreinfo
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send email to 31250@debbugs.gnu.org