[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help request for new Clojure package definition
From: |
Gary Johnson |
Subject: |
Re: Help request for new Clojure package definition |
Date: |
Sat, 05 Nov 2022 14:50:42 -0400 |
Fabio Natali <me@fabionatali.com> writes:
> I'm trying to package Riddley [0], apparently a dependency for a Clojure
> package I'm interested in.
>
> I haven't done much - I started from one of the existing Clojure
> definitions as an example and I went through a few iterations of
> "build-fail-fix-repeat" until I reached the version below. Then I hit a
> wall.
>
> #+begin_src scheme
> (define-public clojure-riddley
> (package
> (name "clojure-riddley")
> (version "0.2.0")
> (home-page "https://github.com/ztellman/riddley")
> (source (origin
> (method git-fetch)
> (uri (git-reference
> (url home-page)
> (commit version)))
> (file-name (git-file-name name version))
> (sha256
> (base32
> "1wpcjxsryzv36bf7ld0y9dw38dqhgji0wb8gsim6dmkgynbmz3q2"))))
> (build-system clojure-build-system)
> (arguments
> '(#:source-dirs '("src/riddley")
> #:java-source-dirs '("src/riddley")
> #:test-dirs '("test/riddley")
> #:doc-dirs '()))
> (synopsis "A Clojure library for walking and transforming code")
> (description "This library provides a correct
> @code{riddley.walk/macroexpand-all}, which preserves the binding information
> in
> @code{&env} and expands inlined functions, and @code{riddley.walk/walk-exprs},
> which is a general mechanism for code walking and transformation.")
> (license license:expat)))
> #+end_src
>
Hi Fabio,
You are quite close. Remember that #:source-dirs and #:test-dirs are
added to the Java classpath when building and running your Clojure
programs. Because the Clojure namespaces in the clojure-riddley package
are riddley.compiler and riddley.walk, you have to make sure not to
include "riddley" in the #:source-dirs or #:test-dirs paths. Here is an
updated package definition that successfully builds on my machine with
the current version of Guix:
#+begin_src clojure
(define-public clojure-riddley
(package
(name "clojure-riddley")
(version "0.2.0")
(home-page "https://github.com/ztellman/riddley")
(source (origin
(method git-fetch)
(uri (git-reference
(url home-page)
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32
"1wpcjxsryzv36bf7ld0y9dw38dqhgji0wb8gsim6dmkgynbmz3q2"))))
(build-system clojure-build-system)
(arguments
'(#:source-dirs '("src")
#:java-source-dirs '("src/riddley")
#:test-dirs '("test")
#:doc-dirs '()))
(synopsis "A Clojure library for walking and transforming code")
(description "This library provides a correct
@code{riddley.walk/macroexpand-all}, which preserves the binding information in
@code{&env} and expands inlined functions, and @code{riddley.walk/walk-exprs},
which is a general mechanism for code walking and transformation.")
(license expat)))
#+end_src
--
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
=======================================================================
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
Why is HTML email a security nightmare? See https://useplaintext.email/
Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html