unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Package version at build side
@ 2014-11-04 19:35 Andreas Enge
  2014-11-04 20:55 ` Eric Bavier
  2014-11-04 21:45 ` Ludovic Courtès
  0 siblings, 2 replies; 4+ messages in thread
From: Andreas Enge @ 2014-11-04 19:35 UTC (permalink / raw)
  To: guix-devel

Hello,

for kdelibs, I need to pass the version of the input docbook-xsl as
a configure flag. So I added something like

       #:configure-flags
        (list "-DCMAKE_VERBOSE_MAKEFILE=ON" ; for debugging
              (let ((docbook-xsl (assoc-ref %build-inputs "docbook-xsl")))
                (string-append "-DDOCBOOKXSL_DIR="
                               docbook-xsl
                               "/xml/xsl/docbook-xsl-"
                               (package-version docbook-xsl)
                               "/")))

Now package-version seems to be defined in (guix package); when I add this as
modules, more and more of them are pulled in. Currently I have

       #:modules ((guix packages) ; for PACKAGE-VERSION
                  (guix base32)
                  (guix config)
                  (guix derivations)
                  (guix records)
                  (guix serialization)
                  (guix store)
                  (guix utils)
                  (guix build syscalls)
                  (guix build utils))
       #:imported-modules ((guix packages)
                           (guix base32)
                           (guix config)
                           (guix derivations)
                           (guix records)
                           (guix serialization)
                           (guix store)
                           (guix utils)
                           (guix build syscalls)
                           (guix build utils))

When I "make" and "./pre-inst-env guix build kdelibs", I get
ice-9/boot-9.scm:106:20: no code for module (guix hash)

So I add (guix hash), and then I get "no code for module (guix ...)"
and so on, probably until all of guix is in my package.

Is there a simpler solution?

Andreas

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

* Re: Package version at build side
  2014-11-04 19:35 Package version at build side Andreas Enge
@ 2014-11-04 20:55 ` Eric Bavier
  2014-11-04 21:25   ` Andreas Enge
  2014-11-04 21:45 ` Ludovic Courtès
  1 sibling, 1 reply; 4+ messages in thread
From: Eric Bavier @ 2014-11-04 20:55 UTC (permalink / raw)
  To: Andreas Enge; +Cc: guix-devel


Andreas Enge writes:

> Hello,
>
> for kdelibs, I need to pass the version of the input docbook-xsl as
> a configure flag. So I added something like
>
>        #:configure-flags
>         (list "-DCMAKE_VERBOSE_MAKEFILE=ON" ; for debugging
>               (let ((docbook-xsl (assoc-ref %build-inputs "docbook-xsl")))
>                 (string-append "-DDOCBOOKXSL_DIR="
>                                docbook-xsl
>                                "/xml/xsl/docbook-xsl-"
>                                (package-version docbook-xsl)
>                                "/")))
[...]
> Is there a simpler solution?

You should be able to do this by quasi-quoting the list and unquoting
package-version.  See e.g. the definition of maxima in maths.scm:891.

-- 
Eric Bavier

Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

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

* Re: Package version at build side
  2014-11-04 20:55 ` Eric Bavier
@ 2014-11-04 21:25   ` Andreas Enge
  0 siblings, 0 replies; 4+ messages in thread
From: Andreas Enge @ 2014-11-04 21:25 UTC (permalink / raw)
  To: Eric Bavier; +Cc: guix-devel

On Tue, Nov 04, 2014 at 02:55:58PM -0600, Eric Bavier wrote:
> You should be able to do this by quasi-quoting the list and unquoting
> package-version.  See e.g. the definition of maxima in maths.scm:891.

That did it, thank you!

Andreas

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

* Re: Package version at build side
  2014-11-04 19:35 Package version at build side Andreas Enge
  2014-11-04 20:55 ` Eric Bavier
@ 2014-11-04 21:45 ` Ludovic Courtès
  1 sibling, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2014-11-04 21:45 UTC (permalink / raw)
  To: Andreas Enge; +Cc: guix-devel

Andreas Enge <andreas@enge.fr> skribis:

> for kdelibs, I need to pass the version of the input docbook-xsl as
> a configure flag. So I added something like
>
>        #:configure-flags
>         (list "-DCMAKE_VERBOSE_MAKEFILE=ON" ; for debugging
>               (let ((docbook-xsl (assoc-ref %build-inputs "docbook-xsl")))
>                 (string-append "-DDOCBOOKXSL_DIR="
>                                docbook-xsl
>                                "/xml/xsl/docbook-xsl-"
>                                (package-version docbook-xsl)
                                 ^
Missing unquote (comma) here.  --’
See gps.scm for an example.

> Now package-version seems to be defined in (guix package); when I add this as
> modules, more and more of them are pulled in. Currently I have
>
>        #:modules ((guix packages) ; for PACKAGE-VERSION
>                   (guix base32)
>                   (guix config)
>                   (guix derivations)
>                   (guix records)
>                   (guix serialization)
>                   (guix store)
>                   (guix utils)
>                   (guix build syscalls)
>                   (guix build utils))

The raison d’être of the (guix build …) name space is precisely to
distinguish modules to be used on the build side from modules to be used
on the host side (info "(guix) G-Expressions").  The above approach is
not going to work, because it tries to import purely host code on the
build side.

Thanks,
Ludo’.

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

end of thread, other threads:[~2014-11-04 21:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-04 19:35 Package version at build side Andreas Enge
2014-11-04 20:55 ` Eric Bavier
2014-11-04 21:25   ` Andreas Enge
2014-11-04 21:45 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

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

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