guix-patches
[Top][All Lists]
Advanced

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

[bug#46231] Add emilua


From: Vinícius dos Santos Oliveira
Subject: [bug#46231] Add emilua
Date: Thu, 25 Feb 2021 11:11:22 -0300

Em qua., 24 de fev. de 2021 às 12:49, Nicolas Goaziou
<mail@nicolasgoaziou.fr> escreveu:
> > I'll let you do the update then.
> Done.

Thanks.

> I applied the patch. We can now proceed with emilua.

You may find the updated patch (using git format) attached in this email.

Btw, if you don't mind, I'd like to use the space to also make a few
questions guix-related. Emilua is a software similar to NodeJS, but it
doesn't have its own npm, pip, gem, or anything alike. I'd like to use
guix as the package manager in emilua. I don't want to create another
npm. Therefore all the code I'm writing for the emilua's next version
was done with guix in mind.

I've learned about native-search-paths and how it can be used to fill
environment variables such as GST_PLUGIN_PATH. I've learned about the
approach to "merge" directories from each package to fill the guix
environment/profile and how crucial it is for such environment
variables to guide the software running inside it (e.g. python and
PYTHONPATH). That's pretty much solved for me (unless there are other
approaches in guix that I'm missing and they would fit better).

Next step for me is to better understand what's the proper take when
dealing with GStreamer native-search-paths and pkg-config. I'm talking
about GStreamer here because it faces a similar problem and I believe
it's easier to talk on issues from existing and packaged software.

GStreamer defines native-search-paths to
GST_PLUGIN_SYSTEM_PATH=lib/gstreamer-1.0. As far as I tested, if a
package gstreamer-foobar depends on gstreamer and install files to
${prefix}/lib/gstreamer-1.0, then GST_PLUGIN_SYSTEM_PATH will be
automatically updated to also contain gstreamer-foobar's
/gnu/store/*/lib/gstreamer-1.0.

My question here is: how should the software packaged in
gstreamer-foobar find out the proper directory to install its plugins?
Should it be ${prefix}/lib/gstreamer-1.0? Should it be
${prefix}/lib/gstreamer-1.1? That's something that shouldn't be
hardcoded. As far as I see, it can just use the pluginsdir from
GStreamer's pkg-config definition. Like so:

$ pkg-config --variable=pluginsdir gstreamer-1.0

However this command will print the wrong dir in guix. It'll print
something like:

/gnu/store/9if71w58d5mkxfxyc7fpz289qssnkqsv-gstreamer-1.18.2/lib/gstreamer-1.0

But that's the "namespace" for the gstreamer package, not for the
gstreamer-foobar package. A solution would be to invoke pkg-config as
follows:

$ pkg-config --define-variable="prefix=${prefix}"
--variable=pluginsdir gstreamer-1.0

This will actually print the proper ${prefix}/lib/gstreamer-1.0. But
that's my question here. How should pkg-config be invoked properly? I
could just as well invoke it as:

$ pkg-config --define-variable="prefix=${prefix}"
--define-variable=libdir='${prefix}/lib' --variable=pluginsdir
gstreamer-1.0


-- 
Vinícius dos Santos Oliveira
https://vinipsmaker.github.io/

Attachment: 0001-Add-emilua.patch
Description: Text Data


reply via email to

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