Merge pull request #54324 from jtojnar/vapi-setup-hook

Vapi setup hook
This commit is contained in:
Jan Tojnar 2019-01-20 12:37:53 +01:00 committed by GitHub
commit c622d7d77a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 3 deletions

View File

@ -1,5 +1,5 @@
{ stdenv, lib, fetchurl, fetchpatch, pkgconfig, flex, bison, libxslt, autoconf, automake, autoreconfHook
, graphviz, glib, libiconv, libintl, libtool, expat
, graphviz, glib, libiconv, libintl, libtool, expat, substituteAll
}:
let
@ -45,6 +45,11 @@ let
name = "vala-${version}";
version = "${major}.${minor}";
setupHook = substituteAll {
src = ./setup-hook.sh;
apiVersion = major;
};
src = fetchurl {
url = "mirror://gnome/sources/vala/${major}/${name}.tar.xz";
inherit sha256;

View File

@ -0,0 +1,15 @@
make_vala_find_vapi_files() {
# XDG_DATA_DIRS: required for finding .vapi files
if [ -d "$1/share/vala/vapi" -o -d "$1/share/vala-@apiVersion@/vapi" ]; then
addToSearchPath XDG_DATA_DIRS $1/share
fi
}
addEnvHooks "$hostOffset" make_vala_find_vapi_files
_multioutMoveVapiDirs() {
moveToOutput share/vala/vapi "${!outputDev}"
moveToOutput share/vala-@apiVersion@/vapi "${!outputDev}"
}
preFixupHooks+=(_multioutMoveVapiDirs)

View File

@ -4,8 +4,8 @@ make_gobject_introspection_find_gir_files() {
addToSearchPath GI_TYPELIB_PATH $1/lib/girepository-1.0
fi
# XDG_DATA_DIRS: required for .gir files?
if [ -d "$1/share" ]; then
# XDG_DATA_DIRS: required for finding .gir files
if [ -d "$1/share/gir-1.0" ]; then
addToSearchPath XDG_DATA_DIRS $1/share
fi
}