unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Phil Beadling <phil@beadling.co.uk>
To: help-guix <help-guix@gnu.org>
Subject: Subtituting location of ca-certificates.crt
Date: Fri, 24 Sep 2021 16:34:09 +0100	[thread overview]
Message-ID: <CAOvsyQvk4CS3kSC97RPcgdNCgPBW8GFykPUThJz4KEXhY8bGNw@mail.gmail.com> (raw)

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	other threads:[~2021-09-24 15:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=CAOvsyQvk4CS3kSC97RPcgdNCgPBW8GFykPUThJz4KEXhY8bGNw@mail.gmail.com \
    --to=phil@beadling.co.uk \
    --cc=help-guix@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.
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).