help-guix
[Top][All Lists]
Advanced

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

Subtituting location of ca-certificates.crt


From: Phil Beadling
Subject: Subtituting location of ca-certificates.crt
Date: Fri, 24 Sep 2021 16:34:09 +0100

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


reply via email to

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