unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Guillaume Le Vaillant <glv@posteo.net>
To: Jim Newsome <jim@sporksmith.net>
Cc: help-guix@gnu.org
Subject: Re: Reference a store path of an input?
Date: Fri, 17 Dec 2021 08:40:03 +0000	[thread overview]
Message-ID: <87o85fwrio.fsf@kitej> (raw)
In-Reply-To: <f4269cb2-d5eb-90ef-2367-bbc4e122954c@sporksmith.net>

[-- Attachment #1: Type: text/plain, Size: 1271 bytes --]

Jim Newsome <jim@sporksmith.net> skribis:

> I'm just getting started experimenting with guix and guile, so I'm likely
> missing something obvious.
>
> I'm trying to write a package definition for some software that builds with
> cmake and uses glib. The software searches some paths explicitly to find the
> glib headers etc; it should be fixed to use pkg-config instead, but I'd like to
> figure out how to work around it both as a learning exercise and so that I can
> work around it before I can get a fix merged.
>
> I'd like to add some explicit flags to the cmake invocation so that it knows
> where to find glib. What do I substitute in for "get-store-path" below?
> Pointers to how I might have found the appropriate helper or approach on my own
> also appreciated.
>
> ```
> (define-public oniontrace
>   (package
>     (name "oniontrace")
>     (build-system cmake-build-system)
>     (inputs `(("glib", glib)))
>     (arguments
>       '(#:configure-flags
>          (list (string-append "-DCMAKE_EXTRA_INCLUDES=" (get-store-path
>          "glib") "/include"))))
> ...
> ```

I think you're looking for the 'search-input-directory' or
'search-input-file' function.
There is some info about them in [1].

[1] https://guix.gnu.org/fr/blog/2021/the-big-change/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

  reply	other threads:[~2021-12-17  8:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-17  3:20 Reference a store path of an input? Jim Newsome
2021-12-17  8:40 ` Guillaume Le Vaillant [this message]
2021-12-18 15:24   ` Jim Newsome
2021-12-17  8:41 ` Nicolas Goaziou
2021-12-18 15:21   ` Jim Newsome

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=87o85fwrio.fsf@kitej \
    --to=glv@posteo.net \
    --cc=help-guix@gnu.org \
    --cc=jim@sporksmith.net \
    /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).