From 9d6ac12f3935db5fedf530efa6aed8c3913924e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 5 Apr 2018 21:12:18 +0100 Subject: [PATCH 1/4] glib: bin/gio is required by gvfs executables this fixes gvfs in caia (mate desktop) --- pkgs/development/libraries/glib/default.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix index 2c070ff3fa8c..4f347f3e15d0 100644 --- a/pkgs/development/libraries/glib/default.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -57,7 +57,7 @@ stdenv.mkDerivation rec { ++ optional doCheck ./skip-timer-test.patch ++ [ ./schema-override-variable.patch ]; - outputs = [ "out" "dev" "devdoc" ]; + outputs = [ "bin" "out" "dev" "devdoc" ]; outputBin = "dev"; setupHook = ./setup-hook.sh; @@ -106,12 +106,16 @@ stdenv.mkDerivation rec { DETERMINISTIC_BUILD = 1; postInstall = '' + mkdir -p $bin/bin + for app in gapplication gdbus gio gsettings; do + mv "$dev/bin/$app" "$bin/bin" + done + moveToOutput "share/glib-2.0" "$dev" substituteInPlace "$dev/bin/gdbus-codegen" --replace "$out" "$dev" sed -i "$dev/bin/glib-gettextize" -e "s|^gettext_dir=.*|gettext_dir=$dev/share/glib-2.0/gettext|" - '' - # This file is *included* in gtk3 and would introduce runtime reference via __FILE__. - + '' + + # This file is *included* in gtk3 and would introduce runtime reference via __FILE__. sed '1i#line 1 "${name}/include/glib-2.0/gobject/gobjectnotifyqueue.c"' \ -i "$dev"/include/glib-2.0/gobject/gobjectnotifyqueue.c ''; From 4b7c52e010b0aba3bada8f2bce85818475c6dfb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 6 Apr 2018 00:44:25 +0100 Subject: [PATCH 2/4] gtkd: correct glib output --- pkgs/development/libraries/gtkd/default.nix | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pkgs/development/libraries/gtkd/default.nix b/pkgs/development/libraries/gtkd/default.nix index 5a4cf75048f7..125bf7a8c25e 100644 --- a/pkgs/development/libraries/gtkd/default.nix +++ b/pkgs/development/libraries/gtkd/default.nix @@ -37,8 +37,8 @@ stdenv.mkDerivation rec { --replace libpango-1.0.0.dylib ${pango.out}/lib/libpango-1.0.0.dylib \ --replace libpangocairo-1.0.0.dylib ${pango.out}/lib/libpangocairo-1.0.0.dylib substituteInPlace generated/gtkd/gtkc/gobject.d \ - --replace libgobject-2.0.so.0 ${glib}/lib/libgobject-2.0.so.0 \ - --replace libgobject-2.0.0.dylib ${glib}/lib/libgobject-2.0.0.dylib + --replace libgobject-2.0.so.0 ${glib.out}/lib/libgobject-2.0.so.0 \ + --replace libgobject-2.0.0.dylib ${glib.out}/lib/libgobject-2.0.0.dylib substituteInPlace generated/gtkd/gtkc/rsvg.d \ --replace librsvg-2.so.2 ${librsvg}/lib/librsvg-2.so.2 \ --replace librsvg-2.2.dylib ${librsvg}/lib/librsvg-2.2.dylib @@ -63,15 +63,15 @@ stdenv.mkDerivation rec { --replace libgtksourceview-3.0.so.1 ${gtksourceview}/lib/libgtksourceview-3.0.so.1 \ --replace libgtksourceview-3.0.1.dylib ${gtksourceview}/lib/libgtksourceview-3.0.1.dylib substituteInPlace generated/gtkd/gtkc/glib.d \ - --replace libglib-2.0.so.0 ${glib}/lib/libglib-2.0.so.0 \ - --replace libgmodule-2.0.so.0 ${glib}/lib/libgmodule-2.0.so.0 \ - --replace libgobject-2.0.so.0 ${glib}/lib/libgobject-2.0.so.0 \ - --replace libglib-2.0.0.dylib ${glib}/lib/libglib-2.0.0.dylib \ - --replace libgmodule-2.0.0.dylib ${glib}/lib/libgmodule-2.0.0.dylib \ - --replace libgobject-2.0.0.dylib ${glib}/lib/libgobject-2.0.0.dylib + --replace libglib-2.0.so.0 ${glib.out}/lib/libglib-2.0.so.0 \ + --replace libgmodule-2.0.so.0 ${glib.out}/lib/libgmodule-2.0.so.0 \ + --replace libgobject-2.0.so.0 ${glib.out}/lib/libgobject-2.0.so.0 \ + --replace libglib-2.0.0.dylib ${glib.out}/lib/libglib-2.0.0.dylib \ + --replace libgmodule-2.0.0.dylib ${glib.out}/lib/libgmodule-2.0.0.dylib \ + --replace libgobject-2.0.0.dylib ${glib.out}/lib/libgobject-2.0.0.dylib substituteInPlace generated/gtkd/gtkc/gio.d \ - --replace libgio-2.0.so.0 ${glib}/lib/libgio-2.0.so.0 \ - --replace libgio-2.0.0.dylib ${glib}/lib/libgio-2.0.0.dylib + --replace libgio-2.0.so.0 ${glib.out}/lib/libgio-2.0.so.0 \ + --replace libgio-2.0.0.dylib ${glib.out}/lib/libgio-2.0.0.dylib substituteInPlace generated/gstreamer/gstreamerc/gstreamer.d \ --replace libgstreamer-1.0.so.0 ${gstreamer}/lib/libgstreamer-1.0.so.0 \ --replace libgstreamer-1.0.0.dylib ${gstreamer}/lib/libgstreamer-1.0.0.dylib From 8fc6472ace275f24a0530eb191d5d89bc8aee35e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Thu, 30 Aug 2018 19:47:11 +0200 Subject: [PATCH 3/4] gnome-documents, tlaplus: fix glib references --- pkgs/applications/science/logic/tlaplus/toolbox.nix | 2 +- pkgs/desktops/gnome-3/apps/gnome-documents/default.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/logic/tlaplus/toolbox.nix b/pkgs/applications/science/logic/tlaplus/toolbox.nix index 342d91cf5825..f1116a27c0be 100644 --- a/pkgs/applications/science/logic/tlaplus/toolbox.nix +++ b/pkgs/applications/science/logic/tlaplus/toolbox.nix @@ -44,7 +44,7 @@ in stdenv.mkDerivation { --run "set -x; cd $out/toolbox" \ --add-flags "-data ~/.tla-toolbox" \ --prefix PATH : "${jre}/bin" \ - --prefix LD_LIBRARY_PATH : "${swt}/lib:${gtk}/lib:${libXtst}/lib:${glib}/lib" + --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ swt gtk libXtst glib ]}" echo -e "\nCreating TLA Toolbox icons..." pushd "$src" diff --git a/pkgs/desktops/gnome-3/apps/gnome-documents/default.nix b/pkgs/desktops/gnome-3/apps/gnome-documents/default.nix index 9948f9d909b2..f8ce9545a33d 100644 --- a/pkgs/desktops/gnome-3/apps/gnome-documents/default.nix +++ b/pkgs/desktops/gnome-3/apps/gnome-documents/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { ''; preFixup = '' - substituteInPlace $out/bin/gnome-documents --replace gapplication "${glib.dev}/bin/gapplication" + substituteInPlace $out/bin/gnome-documents --replace gapplication "${glib.bin}/bin/gapplication" ''; passthru = { From 80b25db15cdbb3971ae739a6eca998da6845c174 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Thu, 30 Aug 2018 19:45:19 +0200 Subject: [PATCH 4/4] treewide: use glib tools from build-time $PATH Using explicit output feels more flaky in case we e.g. move the binary. (No strong opinion on my side, feel free to revert if you think so.) --- pkgs/applications/audio/gradio/default.nix | 2 +- pkgs/desktops/gnome-3/core/gnome-user-share/default.nix | 2 +- pkgs/desktops/gnome-3/core/tracker-miners/default.nix | 2 +- pkgs/desktops/gnome-3/core/tracker/default.nix | 2 +- pkgs/desktops/gnome-3/extensions/caffeine/default.nix | 2 +- pkgs/desktops/gnome-3/extensions/system-monitor/default.nix | 2 +- pkgs/desktops/gnome-3/extensions/volume-mixer.nix | 2 +- pkgs/desktops/gnome-3/misc/pidgin/default.nix | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/audio/gradio/default.nix b/pkgs/applications/audio/gradio/default.nix index ed34c3118c68..0e636c532b46 100644 --- a/pkgs/applications/audio/gradio/default.nix +++ b/pkgs/applications/audio/gradio/default.nix @@ -56,7 +56,7 @@ in stdenv.mkDerivation rec { enableParallelBuilding = true; postInstall = '' - ${glib.dev}/bin/glib-compile-schemas $out/share/glib-2.0/schemas + glib-compile-schemas "$out"/share/glib-2.0/schemas ''; patches = [ ./0001-Remove-post-install-script-that-hardcodes-paths.patch ]; diff --git a/pkgs/desktops/gnome-3/core/gnome-user-share/default.nix b/pkgs/desktops/gnome-3/core/gnome-user-share/default.nix index da117a536911..5ae579417aec 100644 --- a/pkgs/desktops/gnome-3/core/gnome-user-share/default.nix +++ b/pkgs/desktops/gnome-3/core/gnome-user-share/default.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { postInstall = '' mkdir -p $out/share/gsettings-schemas/$name mv $out/share/glib-2.0 $out/share/gsettings-schemas/$name - ${glib.dev}/bin/glib-compile-schemas $out/share/gsettings-schemas/$name/glib-2.0/schemas + glib-compile-schemas "$out/share/gsettings-schemas/$name/glib-2.0/schemas" ''; meta = with stdenv.lib; { diff --git a/pkgs/desktops/gnome-3/core/tracker-miners/default.nix b/pkgs/desktops/gnome-3/core/tracker-miners/default.nix index 67c43311123c..f33970251d5b 100644 --- a/pkgs/desktops/gnome-3/core/tracker-miners/default.nix +++ b/pkgs/desktops/gnome-3/core/tracker-miners/default.nix @@ -85,7 +85,7 @@ in stdenv.mkDerivation rec { ''; postInstall = '' - ${glib.dev}/bin/glib-compile-schemas $out/share/glib-2.0/schemas + glib-compile-schemas "$out/share/glib-2.0/schemas" ''; passthru = { diff --git a/pkgs/desktops/gnome-3/core/tracker/default.nix b/pkgs/desktops/gnome-3/core/tracker/default.nix index a0da1b7147d2..5d6b326d21d8 100644 --- a/pkgs/desktops/gnome-3/core/tracker/default.nix +++ b/pkgs/desktops/gnome-3/core/tracker/default.nix @@ -40,7 +40,7 @@ in stdenv.mkDerivation rec { ''; postInstall = '' - ${glib.dev}/bin/glib-compile-schemas $out/share/glib-2.0/schemas + glib-compile-schemas "$out/share/glib-2.0/schemas" ''; passthru = { diff --git a/pkgs/desktops/gnome-3/extensions/caffeine/default.nix b/pkgs/desktops/gnome-3/extensions/caffeine/default.nix index d556c5e55ca4..cc9451597169 100644 --- a/pkgs/desktops/gnome-3/extensions/caffeine/default.nix +++ b/pkgs/desktops/gnome-3/extensions/caffeine/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { buildPhase = '' ${bash}/bin/bash ./update-locale.sh - ${glib.dev}/bin/glib-compile-schemas --strict --targetdir=caffeine@patapon.info/schemas/ caffeine@patapon.info/schemas + glib-compile-schemas --strict --targetdir=caffeine@patapon.info/schemas/ caffeine@patapon.info/schemas ''; installPhase = '' diff --git a/pkgs/desktops/gnome-3/extensions/system-monitor/default.nix b/pkgs/desktops/gnome-3/extensions/system-monitor/default.nix index 395e90d263ef..b4b34d91c18e 100644 --- a/pkgs/desktops/gnome-3/extensions/system-monitor/default.nix +++ b/pkgs/desktops/gnome-3/extensions/system-monitor/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { ]; buildPhase = '' - ${glib.dev}/bin/glib-compile-schemas --targetdir=${uuid}/schemas ${uuid}/schemas + glib-compile-schemas --targetdir=${uuid}/schemas ${uuid}/schemas ''; installPhase = '' diff --git a/pkgs/desktops/gnome-3/extensions/volume-mixer.nix b/pkgs/desktops/gnome-3/extensions/volume-mixer.nix index 1487efe0a23f..19ced0b5252c 100644 --- a/pkgs/desktops/gnome-3/extensions/volume-mixer.nix +++ b/pkgs/desktops/gnome-3/extensions/volume-mixer.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { ]; buildPhase = '' - ${glib.dev}/bin/glib-compile-schemas --targetdir=${uuid}/schemas ${uuid}/schemas + glib-compile-schemas --targetdir=${uuid}/schemas ${uuid}/schemas ''; installPhase = '' diff --git a/pkgs/desktops/gnome-3/misc/pidgin/default.nix b/pkgs/desktops/gnome-3/misc/pidgin/default.nix index a5dd1480d3db..c11fdfa6099e 100644 --- a/pkgs/desktops/gnome-3/misc/pidgin/default.nix +++ b/pkgs/desktops/gnome-3/misc/pidgin/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { schemas_dir="$share_dir/gsettings-schemas/${name}/glib-2.0/schemas" mkdir -p "$schemas_dir" mv schemas/* "$schemas_dir" # fix Emacs syntax highlighting: */ - ${glib.dev}/bin/glib-compile-schemas "$schemas_dir" + glib-compile-schemas "$schemas_dir" locale_dir="$share_dir/locale" mkdir -p "$locale_dir"