gnome3: factor out doCompileSchemas

This commit is contained in:
Vladimír Čunát 2013-02-21 21:58:09 +01:00
parent 2c700f3b4a
commit e817e8fcdb
2 changed files with 13 additions and 8 deletions

View File

@ -43,13 +43,7 @@ stdenv.mkDerivation rec {
# by `g_file_info_get_content_type ()'.
wrapProgram "$out/bin/evince" \
--prefix XDG_DATA_DIRS : "${shared_mime_info}/share:$out/share"
for pkg in "${gsettings_desktop_schemas}" "${gtk3}"; do
cp -s $pkg/share/glib-2.0/schemas/*.gschema.xml $out/share/glib-2.0/schemas/
done
${glib}/bin/glib-compile-schemas $out/share/glib-2.0/schemas/
'';
'' + gsettings_desktop_schemas.doCompileSchemas;
doCheck = false; # would need pythonPackages.dogTail, which is missing
meta = {

View File

@ -1,4 +1,6 @@
{ stdenv, fetchurl, pkgconfig, intltool, glib }:
{ stdenv, fetchurl, pkgconfig, intltool, glib
# just for passthru
, gtk3, gsettings_desktop_schemas }:
stdenv.mkDerivation rec {
@ -16,4 +18,13 @@ stdenv.mkDerivation rec {
buildInputs = [ glib ];
nativeBuildInputs = [ pkgconfig intltool ];
passthru = {
doCompileSchemas = ''
for pkg in "${gsettings_desktop_schemas}" "${gtk3}"; do
cp -s $pkg/share/glib-2.0/schemas/*.gschema.xml $out/share/glib-2.0/schemas/
done
${glib}/bin/glib-compile-schemas $out/share/glib-2.0/schemas/
'';
};
}