unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Using a function as build-step?
@ 2016-09-03 18:22 Hartmut Goebel
  2016-09-03 18:35 ` David Craven
  2016-09-05 21:01 ` Using a function as build-step? Ludovic Courtès
  0 siblings, 2 replies; 10+ messages in thread
From: Hartmut Goebel @ 2016-09-03 18:22 UTC (permalink / raw)
  To: Guix-devel

[-- 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 --]

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

end of thread, other threads:[~2016-09-06  7:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-03 18:22 Using a function as build-step? Hartmut Goebel
2016-09-03 18:35 ` 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

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