all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Installing Perl module with C library dependencies
@ 2019-10-11  1:53 Jone
  2019-10-11  8:33 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Jone @ 2019-10-11  1:53 UTC (permalink / raw)
  To: help-guix

Hi community!
My problem:
❯ cpanm -i Term::ReadLine::Gnu
  Configure failed... See build.log for details.
      Could not find neither libtermcap, libtinfo, libncurses, or libcurses.
❯ guix package -p /run/current-system/profile -I | grep ncurses
   ncurses    6.1    out
/gnu/store/4h03mp5nggsblscs6j0n7s6sbpfy6kxh-ncurses-6.1

I do not know what to do in this case.
Well.. maybe build a package? Ok:

(define-module (gnu packages perl)
  #:use-module (srfi srfi-1)
  #:use-module (guix licenses)
  #:use-module (gnu packages)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix utils)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system perl)
  #:use-module (gnu packages base)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages freedesktop)
  #:use-module (gnu packages less)
  #:use-module (gnu packages perl-check)
  #:use-module (gnu packages perl-compression)
  #:use-module (gnu packages perl-web)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages textutils))
(define-public perl-term-readline-gnu
  (package
   (name "perl-term-readline-gnu")
   (version "1.36")
   (source
    (origin
     (method url-fetch)
     (uri (string-append
           "mirror://cpan/authors/id/H/HA/HAYASHI/Term-ReadLine-Gnu-"
           version
           ".tar.gz"))
     (sha256
      (base32
       "09b9mcmp09kdfh5jaqdr528yny8746hvn3f185aqd6rw06jgf24s"))))
   (build-system perl-build-system)
   (home-page "https://metacpan.org/release/Term-ReadLine-Gnu")
   (synopsis "Perl extension for the GNU Readline/History Library")
   (description "@code{Term::ReadLine::Gnu} extension for the GNU
Readline/History Library.")
   (license (package-license perl))))

❯ guix package -f  perl-term-readline-gnu.scm
   perl-term-readline-gnu.scm:25:4: error: perl: unbound variable
   hint: Did you forget a `use-modules' form?

Hmm, there's something wrong here. But section 'define-module' is a from
perl.scm. And what to do?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Installing Perl module with C library dependencies
  2019-10-11  1:53 Installing Perl module with C library dependencies Jone
@ 2019-10-11  8:33 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2019-10-11  8:33 UTC (permalink / raw)
  To: Jone; +Cc: help-guix

Hello Jone,

Jone <yeger9@gmail.com> skribis:

> My problem:
> ❯ cpanm -i Term::ReadLine::Gnu
>   Configure failed... See build.log for details.
>       Could not find neither libtermcap, libtinfo, libncurses, or libcurses.
> ❯ guix package -p /run/current-system/profile -I | grep ncurses
>    ncurses    6.1    out
> /gnu/store/4h03mp5nggsblscs6j0n7s6sbpfy6kxh-ncurses-6.1
>
> I do not know what to do in this case.
> Well.. maybe build a package? Ok:

In general building and using a Guix package is preferable.  :-)

> (define-module (gnu packages perl)

You cannot call your module this way.  If you do, it will shadow the
“real” (gnu packages perl), which provides the variable ‘perl’ for the
Perl package.

Also, you need to add ‘perl-term-readline-gnu’ at the end of the file so
that it actually returns the package you’ve defined, which will then
allow “guix package -p perl-term-readline-gnu.scm” to work.

HTH!

Ludo’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-11  8:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-11  1:53 Installing Perl module with C library dependencies Jone
2019-10-11  8:33 ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.