guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Packaging Jami progress


From: Pierre Neidhardt
Subject: Re: Packaging Jami progress
Date: Wed, 04 Dec 2019 17:06:16 +0100

Jan Wielkiewicz <address@hidden> writes:

> Dnia 2019-12-04, o godz. 16:27:26
> Pierre Neidhardt <address@hidden> napisaƂ(a):
>
>> You need to export the symbol.
>> To do so, you can either specify the symbol in the #:export part of
>> the module at the top of the file, or simply use `define-public` when
>> defining the variable.
> Okay, thanks.
>
>> Can you give an example?  I don't understand what you mean.
> I would like to have something like this:
>
> (define-public jami-apply-dependency-patches
>   (lambda* (#:key inputs patches dependency-name #:allow-other-keys)
>          (let ((savoir-faire-linux-patches-directory "Savoir-faire Linux 
> patches"))
>            (mkdir-p savoir-faire-linux-patches-directory)
>            (invoke "tar" "-xvf" (assoc-ref inputs 
> "savoir-faire-linux-patches")
>                    "-C" savoir-faire-linux-patches-directory
>                    "--strip-components=5"
>                    (string-append "ring-project/daemon/contrib/src/"
>                                   dependency-name))
>            (for-each
>             (lambda (file)
>               (invoke "patch" "--force" "-p1" "-i"
>                       (string-append savoir-faire-linux-patches-directory "/"
>                                      file ".patch")))
>             patches))
>          #t))
>
> And then invoke it like this
> (add-after 'unpack 'apply-patches (jami-apply-dependency-patches
> #:dependency-name "pjproject" #:patches '(*the list*) #:inputs inputs)

You need a lambda here:

--8<---------------cut here---------------start------------->8---
(add-after 'unpack 'apply-patches
  (lambda* (#:key inputs #:allow-other-keys)
    (let ((my-input (assoc-ref inputs "my-input")))
      (jami-apply-dependency-patches #:inputs my-input))))
--8<---------------cut here---------------end--------------->8---
 
See the other packages for many more examples.
Does that make sense?

-- 
Pierre Neidhardt
https://ambrevar.xyz/

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]