all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Hartmut Goebel <h.goebel@goebel-consult.de>
To: Guix-devel <guix-devel@gnu.org>
Subject: Using a function as build-step?
Date: Sat, 3 Sep 2016 20:22:37 +0200	[thread overview]
Message-ID: <0b8f97f5-d931-a344-1000-8ab64233f026@goebel-consult.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 1433 bytes --]

Hi,

while packaging some java apache common packages, I found myself adding
some build steps over and over again, like this one:

         (replace 'install
           (lambda* (#:key outputs #:allow-other-keys)
             (let ((share (string-append (assoc-ref outputs "out")
                                         "/share/java")))
               (for-each (λ (f) (install-file f share))
                         (find-files "target" "\\.jar$")))))

Now I tried replacing this by a simple line like

         (add-after 'install 'install-javadocs install-javadocs)

and of course some function:

  (define* (install-javadoc #:key outputs #:allow-other-keys)
    (let ((docs (string-append (assoc-ref outputs "doc")
                               "/share/doc/" ,name "-" ,version "/")))
      (mkdir-p docs)
      (copy-recursively "target/apidocs" docs)
      ))

I did not manage this - not even if not using "name" and "version" and
not using any function parameters.

What is the correct code?

-- 
Schönen Gruß
Hartmut Goebel
Dipl.-Informatiker (univ), CISSP, CSSLP, ISO 27001 Lead Implementer
Information Security Management, Security Governance, Secure Software
Development

Goebel Consult, Landshut
http://www.goebel-consult.de

Blog: http://www.goebel-consult.de/blog/feiertagsarbeit-bei-teletrust
Kolumne: http://www.cissp-gefluester.de/2010-06-adobe-und-der-maiszunsler


[-- Attachment #2: Type: text/html, Size: 2773 bytes --]

             reply	other threads:[~2016-09-03 18:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-03 18:22 Hartmut Goebel [this message]
2016-09-03 18:35 ` Using a function as build-step? David Craven
2016-09-04 11:25   ` Hartmut Goebel
2016-09-04 11:29     ` David Craven
2016-09-04 11:43       ` Hartmut Goebel
2016-09-04 11:43       ` Using a function as build-step? (w/ attachement) Hartmut Goebel
2016-09-04 15:33         ` David Craven
2016-09-05 21:01 ` Using a function as build-step? Ludovic Courtès
2016-09-06  7:20   ` Ricardo Wurmus
2016-09-06  7:35     ` Hartmut Goebel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0b8f97f5-d931-a344-1000-8ab64233f026@goebel-consult.de \
    --to=h.goebel@goebel-consult.de \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.