[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Reference a store path of an input?
From: |
Guillaume Le Vaillant |
Subject: |
Re: Reference a store path of an input? |
Date: |
Fri, 17 Dec 2021 08:40:03 +0000 |
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/
signature.asc
Description: PGP signature