unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Subtituting location of ca-certificates.crt
@ 2021-09-24 15:34 Phil Beadling
  0 siblings, 0 replies; only message in thread
From: Phil Beadling @ 2021-09-24 15:34 UTC (permalink / raw)
  To: help-guix

Hi all,

I have a package defintion that needs to the know the location of
ca-certificates.crt at build time.  I've resolved similar problems before
by patching the location of certs after the unpack stage to match the
location of nss-certs (see below).

However, it looks like the actual cert bundle file is not part of nss-certs
package:
ca-certificates.crt ->
/gnu/store/ml3ljnqavqpgsvw2486l5rs11zc0yf16-ca-certificate-bundle/etc/ssl/certs/ca-certificates.crt

ca-certificate-bundle isn't a regular package that I can reference like
nss-certs.

I can find it defined in the source code here:
https://github.com/guix-mirror/guix/blob/0f2a17de06a52ca56c90368e29644036c14abad2/guix/profiles.scm#L1054

If this file only exists in a profile how can I know it's location at build
time?

Thanks,
Phil.

Approach taken when the directory is required rather than the bundle:

    (arguments
     '(#:phases
       (modify-phases %standard-phases
         ;; Patch SSL Certs to use nss-certs location
         (add-after 'unpack 'patch-certs
           (lambda* (#:key inputs #:allow-other-keys)
             (substitute* "app/foo/main.cpp"
               (("/etc/ssl/certs") ;; by default app runs off Ubuntu
location
                (string-append (assoc-ref inputs "nss-certs")
"/etc/ssl/certs")))

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-24 15:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-24 15:34 Subtituting location of ca-certificates.crt Phil Beadling

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