unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* "no code for module"
@ 2019-12-28 22:28 Nathan Dehnel
  2019-12-28 22:57 ` Ricardo Wurmus
  2019-12-28 23:03 ` Julien Lepiller
  0 siblings, 2 replies; 4+ messages in thread
From: Nathan Dehnel @ 2019-12-28 22:28 UTC (permalink / raw)
  To: help-guix

I made a package which is basically a clone of the "hello" package example.

(use-modules (guix packages)
             (guix download)
             (guix build-system gnu)
             (guix licenses))
(define-public deadbeef
 (package
   (name "deadbeef")
   (version "1.8.2")
   (source (origin
             (method url-fetch)
             (uri (string-append
"https://github.com/DeaDBeeF-Player/deadbeef/archive/" version
                                 ".tar.gz"))
             (sha256
              (base32
               "1wsx62gi1bfd9rx5br2gprq4q3sfp7iqj1inxhhiqjasbm85vg50"))))
   (build-system gnu-build-system)
   (synopsis "A music player for *nix-like systems and OS X")
   (description
    "GNU Hello prints the message \"Hello, world!\" and then exits.  It
serves as an example of standard GNU coding practices.  As such, it supports
command-line arguments, multiple languages, and so on.")
   (home-page "https://deadbeef.sourceforge.io/")
   (license gpl2)))

I added it to a channel, and added the channel, then ran guix pull. I
got this error:

(repl-version 0 0)
(exception misc-error (value #f) (value "~A ~S") (value ("no code for
module" (deadbeef))) (value #f))

Any idea what the problem is?

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

* Re: "no code for module"
  2019-12-28 22:28 "no code for module" Nathan Dehnel
@ 2019-12-28 22:57 ` Ricardo Wurmus
  2019-12-28 23:03 ` Julien Lepiller
  1 sibling, 0 replies; 4+ messages in thread
From: Ricardo Wurmus @ 2019-12-28 22:57 UTC (permalink / raw)
  To: Nathan Dehnel; +Cc: help-guix


Nathan Dehnel <ncdehnel@gmail.com> writes:

> I made a package which is basically a clone of the "hello" package example.
>
> (use-modules (guix packages)
>              (guix download)
>              (guix build-system gnu)
>              (guix licenses))
> (define-public deadbeef
>  (package
>    (name "deadbeef")
>    (version "1.8.2")
>    (source (origin
>              (method url-fetch)
>              (uri (string-append
> "https://github.com/DeaDBeeF-Player/deadbeef/archive/" version
>                                  ".tar.gz"))
>              (sha256
>               (base32
>                "1wsx62gi1bfd9rx5br2gprq4q3sfp7iqj1inxhhiqjasbm85vg50"))))
>    (build-system gnu-build-system)
>    (synopsis "A music player for *nix-like systems and OS X")
>    (description
>     "GNU Hello prints the message \"Hello, world!\" and then exits.  It
> serves as an example of standard GNU coding practices.  As such, it supports
> command-line arguments, multiple languages, and so on.")
>    (home-page "https://deadbeef.sourceforge.io/")
>    (license gpl2)))
>
> I added it to a channel, and added the channel, then ran guix pull. I
> got this error:
>
> (repl-version 0 0)
> (exception misc-error (value #f) (value "~A ~S") (value ("no code for
> module" (deadbeef))) (value #f))

You are not showing us how you are refering to this file.  “deadbeef” is
a variable, but something in your channel specification treats it as a
module.  The easiest way to fix this is to turn the above code into a
proper module, i.e. a file with a define-module expression at the top
and a matching name.

Can you show us the rest of your code?

--
Ricardo

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

* Re: "no code for module"
  2019-12-28 22:28 "no code for module" Nathan Dehnel
  2019-12-28 22:57 ` Ricardo Wurmus
@ 2019-12-28 23:03 ` Julien Lepiller
  2019-12-28 23:17   ` Nathan Dehnel
  1 sibling, 1 reply; 4+ messages in thread
From: Julien Lepiller @ 2019-12-28 23:03 UTC (permalink / raw)
  To: help-guix, Nathan Dehnel

Le 28 décembre 2019 23:28:50 GMT+01:00, Nathan Dehnel <ncdehnel@gmail.com> a écrit :
>I made a package which is basically a clone of the "hello" package
>example.
>
>(use-modules (guix packages)
>             (guix download)
>             (guix build-system gnu)
>             (guix licenses))
>(define-public deadbeef
> (package
>   (name "deadbeef")
>   (version "1.8.2")
>   (source (origin
>             (method url-fetch)
>             (uri (string-append
>"https://github.com/DeaDBeeF-Player/deadbeef/archive/" version
>                                 ".tar.gz"))
>             (sha256
>              (base32
>             "1wsx62gi1bfd9rx5br2gprq4q3sfp7iqj1inxhhiqjasbm85vg50"))))
>   (build-system gnu-build-system)
>   (synopsis "A music player for *nix-like systems and OS X")
>   (description
>    "GNU Hello prints the message \"Hello, world!\" and then exits.  It
>serves as an example of standard GNU coding practices.  As such, it
>supports
>command-line arguments, multiple languages, and so on.")
>   (home-page "https://deadbeef.sourceforge.io/")
>   (license gpl2)))
>
>I added it to a channel, and added the channel, then ran guix pull. I
>got this error:
>
>(repl-version 0 0)
>(exception misc-error (value #f) (value "~A ~S") (value ("no code for
>module" (deadbeef))) (value #f))
>
>Any idea what the problem is?

I think you need to make it an actual guile module, like this:

(define-module (deadbeef)
  #:use-module (guix packages)
  #:use-module (guix build-system gnu)
  …)

Instead of simple use-modules. Does it make sense?

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

* Re: "no code for module"
  2019-12-28 23:03 ` Julien Lepiller
@ 2019-12-28 23:17   ` Nathan Dehnel
  0 siblings, 0 replies; 4+ messages in thread
From: Nathan Dehnel @ 2019-12-28 23:17 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: help-guix

Yes, that was the problem, thanks.

On Sat, Dec 28, 2019 at 5:03 PM Julien Lepiller <julien@lepiller.eu> wrote:
>
> Le 28 décembre 2019 23:28:50 GMT+01:00, Nathan Dehnel <ncdehnel@gmail.com> a écrit :
> >I made a package which is basically a clone of the "hello" package
> >example.
> >
> >(use-modules (guix packages)
> >             (guix download)
> >             (guix build-system gnu)
> >             (guix licenses))
> >(define-public deadbeef
> > (package
> >   (name "deadbeef")
> >   (version "1.8.2")
> >   (source (origin
> >             (method url-fetch)
> >             (uri (string-append
> >"https://github.com/DeaDBeeF-Player/deadbeef/archive/" version
> >                                 ".tar.gz"))
> >             (sha256
> >              (base32
> >             "1wsx62gi1bfd9rx5br2gprq4q3sfp7iqj1inxhhiqjasbm85vg50"))))
> >   (build-system gnu-build-system)
> >   (synopsis "A music player for *nix-like systems and OS X")
> >   (description
> >    "GNU Hello prints the message \"Hello, world!\" and then exits.  It
> >serves as an example of standard GNU coding practices.  As such, it
> >supports
> >command-line arguments, multiple languages, and so on.")
> >   (home-page "https://deadbeef.sourceforge.io/")
> >   (license gpl2)))
> >
> >I added it to a channel, and added the channel, then ran guix pull. I
> >got this error:
> >
> >(repl-version 0 0)
> >(exception misc-error (value #f) (value "~A ~S") (value ("no code for
> >module" (deadbeef))) (value #f))
> >
> >Any idea what the problem is?
>
> I think you need to make it an actual guile module, like this:
>
> (define-module (deadbeef)
>   #:use-module (guix packages)
>   #:use-module (guix build-system gnu)
>   …)
>
> Instead of simple use-modules. Does it make sense?

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

end of thread, other threads:[~2019-12-28 23:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-28 22:28 "no code for module" Nathan Dehnel
2019-12-28 22:57 ` Ricardo Wurmus
2019-12-28 23:03 ` Julien Lepiller
2019-12-28 23:17   ` Nathan Dehnel

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).