On Wednesday, 17 March 2021 at 06:07:01 UTC, user1234 wrote:
You can use local a specific local version too, for example the
git repository
#!/usr/bin/env dub
/+ dub.sdl:
dependency "mir-algorithm"
path="/home/x/repositories/mir/mir-algorithm"
+/
In addition with --nodeps, no internet is required.
Very handy example. Unfortunately it means that paths are
embedded
in scripts, which is usually a bad idea.
I'm still looking for environment variables or config files that
affect
dub's module include path. Is there dub variable to give a
general path
for all dependencies? Since dub can read environment variables,
this
may be a way to get a top-level module directory known to scripts
without
hard coding paths.
Also, what do people do when generating .deb or .rpm packages for
D
libraries? They must reference some local library path in a
general
fashion (I would think).
The only module paths I see referenced in:
/etc/dmd.conf
are for phobos and the runtime import. I guess I could just add
another
one there. Not sure if gdc also uses that file.