Merge branch 'gwrap'

This commit is contained in:
Luca Bruno 2015-07-29 11:32:01 +00:00
commit 2e92e7c06a
8 changed files with 59 additions and 47 deletions

View File

@ -0,0 +1,33 @@
gappsWrapperArgs=()
wrapGAppsHook() {
if [ -n "$GDK_PIXBUF_MODULE_FILE" ]; then
gappsWrapperArgs+=(--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE")
fi
if [ -n "$XDG_ICON_DIRS" ]; then
gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS")
fi
if [ -n "$GSETTINGS_SCHEMAS_PATH" ]; then
gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH")
fi
if [ -d "$prefix/share" ]; then
gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : "$out/share")
fi
for v in $wrapPrefixVariables GST_PLUGIN_SYSTEM_PATH_1_0 GI_TYPELIB_PATH GRL_PLUGIN_PATH; do
eval local dummy="\$$v"
gappsWrapperArgs+=(--prefix $v : "$dummy")
done
if [ -z "$dontWrapGApps" ]; then
for i in $prefix/bin/* $prefix/libexec/*; do
echo "Wrapping app $i"
wrapProgram "$i" "${gappsWrapperArgs[@]}"
done
fi
}
fixupOutputHooks+=(wrapGAppsHook)

View File

@ -1,7 +1,7 @@
{ stdenv, intltool, fetchurl, libgweather, libnotify
, pkgconfig, gtk3, glib, hicolor_icon_theme, gsound
, makeWrapper, itstool, libcanberra_gtk3, libtool
, gnome3, librsvg, gdk_pixbuf, geoclue2 }:
, gnome3, librsvg, gdk_pixbuf, geoclue2, wrapGAppsHook }:
stdenv.mkDerivation rec {
name = "gnome-clocks-${gnome3.version}.1";
@ -13,23 +13,15 @@ stdenv.mkDerivation rec {
doCheck = true;
propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard ];
buildInputs = [ pkgconfig gtk3 glib intltool itstool libcanberra_gtk3
gnome3.gsettings_desktop_schemas makeWrapper
gdk_pixbuf gnome3.adwaita-icon-theme librsvg
gnome3.gnome_desktop gnome3.geocode_glib geoclue2
libgweather libnotify libtool gsound
hicolor_icon_theme gnome3.adwaita-icon-theme ];
hicolor_icon_theme wrapGAppsHook ];
enableParallelBuilding = true;
preFixup = ''
wrapProgram "$out/bin/gnome-clocks" \
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
--prefix XDG_DATA_DIRS : "${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH"
'';
meta = with stdenv.lib; {
homepage = https://wiki.gnome.org/Apps/Clocks;
description = "Clock application designed for GNOME 3";

View File

@ -3,7 +3,7 @@
, makeWrapper, itstool, libxslt, webkitgtk
, gnome3, librsvg, gdk_pixbuf, libsoup, docbook_xsl
, gobjectIntrospection, json_glib
, gmp, desktop_file_utils }:
, gmp, desktop_file_utils, wrapGAppsHook }:
stdenv.mkDerivation rec {
name = "gnome-documents-${gnome3.version}.0";
@ -24,21 +24,14 @@ stdenv.mkDerivation rec {
libsoup webkitgtk gjs gobjectIntrospection gnome3.rest
gnome3.tracker gnome3.libgdata gnome3.gnome_online_accounts
gnome3.gnome_desktop gnome3.libzapojit json_glib
hicolor_icon_theme gnome3.adwaita-icon-theme ];
wrapGAppsHook ];
enableParallelBuilding = true;
preFixup =
''
preFixup = ''
substituteInPlace $out/bin/gnome-documents --replace gapplication "${glib}/bin/gapplication"
for f in $out/bin/* $out/libexec/*; do
wrapProgram "$f" \
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
--prefix XDG_DATA_DIRS : "${gnome3.gnome_themes_standard}/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" \
--run "if [ -z \"\$XDG_CACHE_DIR\" ]; then XDG_CACHE_DIR=\$HOME/.cache; fi; if [ -w \"\$XDG_CACHE_DIR/..\" ]; then mkdir -p \"\$XDG_CACHE_DIR/gnome-documents\"; fi"
done
gappsWrapperArgs+=(--run 'if [ -z "$XDG_CACHE_DIR" ]; then XDG_CACHE_DIR=$HOME/.cache; fi; if [ -w "$XDG_CACHE_DIR/.." ]; then mkdir -p "$XDG_CACHE_DIR/gnome-documents"; fi')
'';
meta = with stdenv.lib; {

View File

@ -1,5 +1,5 @@
{ stdenv, intltool, fetchurl, gdk_pixbuf, tracker
, python3, libxml2, python3Packages, libnotify
, python3, libxml2, python3Packages, libnotify, wrapGAppsHook
, pkgconfig, gtk3, glib, hicolor_icon_theme, cairo
, makeWrapper, itstool, gnome3, librsvg, gst_all_1 }:
@ -15,24 +15,16 @@ stdenv.mkDerivation rec {
buildInputs = [ pkgconfig gtk3 glib intltool itstool gnome3.libmediaart
gdk_pixbuf gnome3.adwaita-icon-theme librsvg python3
gnome3.grilo libxml2 python3Packages.pygobject3 libnotify
gnome3.grilo gnome3.grilo-plugins libxml2 python3Packages.pygobject3 libnotify
python3Packages.pycairo python3Packages.dbus gnome3.totem-pl-parser
gst_all_1.gstreamer gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good gst_all_1.gst-plugins-bad
hicolor_icon_theme gnome3.adwaita-icon-theme
hicolor_icon_theme gnome3.adwaita-icon-theme wrapGAppsHook
gnome3.gsettings_desktop_schemas makeWrapper tracker ];
enableParallelBuilding = true;
wrapPrefixVariables = [ "PYTHONPATH" ];
preFixup = ''
wrapProgram "$out/bin/gnome-music" \
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
--prefix XDG_DATA_DIRS : "${gnome3.gnome_themes_standard}/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" \
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0" \
--prefix GRL_PLUGIN_PATH : "${gnome3.grilo-plugins}/lib/grilo-0.2" \
--prefix PYTHONPATH : "$PYTHONPATH"
'';
enableParallelBuilding = true;
meta = with stdenv.lib; {
homepage = https://wiki.gnome.org/Apps/Music;

View File

@ -1,7 +1,7 @@
{ stdenv, intltool, fetchurl, exempi, libxml2
, pkgconfig, gtk3, glib, hicolor_icon_theme
, makeWrapper, itstool, gegl, babl, lcms2
, desktop_file_utils, gmp, libmediaart
, desktop_file_utils, gmp, libmediaart, wrapGAppsHook
, gnome3, librsvg, gdk_pixbuf, libexif }:
stdenv.mkDerivation rec {
@ -14,8 +14,6 @@ stdenv.mkDerivation rec {
# doCheck = true;
propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard ];
NIX_CFLAGS_COMPILE = "-I${gnome3.glib}/include/gio-unix-2.0";
buildInputs = [ pkgconfig gtk3 glib intltool itstool gegl babl gnome3.libgdata
@ -24,16 +22,7 @@ stdenv.mkDerivation rec {
gnome3.gfbgraph gnome3.grilo-plugins gnome3.grilo
gnome3.gnome_online_accounts gnome3.gnome_desktop
lcms2 libexif gnome3.tracker libxml2 desktop_file_utils
hicolor_icon_theme gnome3.adwaita-icon-theme ];
preFixup = ''
for f in $out/bin/* $out/libexec/*; do
wrapProgram "$f" \
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
--prefix GRL_PLUGIN_PATH : "${gnome3.grilo-plugins}/lib/grilo-0.2" \
--prefix XDG_DATA_DIRS : "${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH"
done
'';
wrapGAppsHook ];
enableParallelBuilding = true;

View File

@ -9,6 +9,8 @@ stdenv.mkDerivation rec {
sha256 = "11bvc7rsrjjwz8hp67p3fn8zmywrpawrcbi3vgw8b0dwa0sndd2m";
};
setupHook = ./setup-hook.sh;
configureFlags = [ "--enable-grl-pls" "--enable-grl-net" ];
preConfigure = ''

View File

@ -0,0 +1,7 @@
make_grilo_find_plugins() {
if [ -d "$1"/lib/grilo-0.2 ]; then
addToSearchPath GRL_PLUGIN_PATH "$1/lib/grilo-0.2"
fi
}
envHooks+=(make_grilo_find_plugins)

View File

@ -514,6 +514,10 @@ let
findXMLCatalogs = makeSetupHook { } ../build-support/setup-hooks/find-xml-catalogs.sh;
wrapGAppsHook = makeSetupHook {
deps = [ makeWrapper ];
} ../build-support/setup-hooks/wrap-gapps-hook.sh;
### TOOLS