diff --git a/pkgs/applications/backup/deja-dup/default.nix b/pkgs/applications/backup/deja-dup/default.nix index 4f8e520cb9f2..5dfb0c8d2779 100644 --- a/pkgs/applications/backup/deja-dup/default.nix +++ b/pkgs/applications/backup/deja-dup/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { ]; postPatch = '' - substituteInPlace deja-dup/nautilus/NautilusExtension.c --subst-var-by DEJA_DUP_GSETTINGS_PATH $out/share/gsettings-schemas/${pname}-${version}/glib-2.0/schemas + substituteInPlace deja-dup/nautilus/NautilusExtension.c --subst-var-by DEJA_DUP_GSETTINGS_PATH ${glib.makeSchemaPath "$out" "${pname}-${version}"} ''; nativeBuildInputs = [ diff --git a/pkgs/desktops/gnome-3/core/evolution-data-server/default.nix b/pkgs/desktops/gnome-3/core/evolution-data-server/default.nix index dda45a71fe20..0048b02581a7 100644 --- a/pkgs/desktops/gnome-3/core/evolution-data-server/default.nix +++ b/pkgs/desktops/gnome-3/core/evolution-data-server/default.nix @@ -23,8 +23,8 @@ stdenv.mkDerivation rec { ]; prePatch = '' - substitute ${./hardcode-gsettings.patch} hardcode-gsettings.patch --subst-var-by ESD_GSETTINGS_PATH $out/share/gsettings-schemas/${pname}-${version}/glib-2.0/schemas \ - --subst-var-by GDS_GSETTINGS_PATH "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}/glib-2.0/schemas" + substitute ${./hardcode-gsettings.patch} hardcode-gsettings.patch --subst-var-by ESD_GSETTINGS_PATH ${glib.makeSchemaPath "$out" "${pname}-${version}"} \ + --subst-var-by GDS_GSETTINGS_PATH ${glib.getSchemaPath gsettings-desktop-schemas} patches="$patches $PWD/hardcode-gsettings.patch" ''; diff --git a/pkgs/desktops/gnome-3/core/gnome-shell-extensions/default.nix b/pkgs/desktops/gnome-3/core/gnome-shell-extensions/default.nix index 761216600120..3d37040828c5 100644 --- a/pkgs/desktops/gnome-3/core/gnome-shell-extensions/default.nix +++ b/pkgs/desktops/gnome-3/core/gnome-shell-extensions/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { # Fixup adapted from export-zips.sh in the source. extensiondir=$out/share/gnome-shell/extensions - schemadir=$out/share/gsettings-schemas/${pname}-${version}/glib-2.0/schemas/ + schemadir=${glib.makeSchemaPath "$out" "${pname}-${version}"} glib-compile-schemas $schemadir diff --git a/pkgs/desktops/gnome-3/extensions/gsconnect/default.nix b/pkgs/desktops/gnome-3/extensions/gsconnect/default.nix index 0d9d54167ff2..e1735476c1ec 100644 --- a/pkgs/desktops/gnome-3/extensions/gsconnect/default.nix +++ b/pkgs/desktops/gnome-3/extensions/gsconnect/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { (substituteAll { src = ./fix-paths.patch; gapplication = "${glib.bin}/bin/gapplication"; - mutter_gsettings_path = "${gnome3.mutter}/share/gsettings-schemas/${gnome3.mutter.name}/glib-2.0/schemas"; + mutter_gsettings_path = "${glib.getSchemaPath gnome3.mutter}"; }) ]; @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { mesonFlags = [ "-Dgnome_shell_libdir=${gnome3.gnome-shell}/lib" - "-Dgsettings_schemadir=${placeholder "out"}/share/gsettings-schemas/${pname}-${version}/glib-2.0/schemas" + "-Dgsettings_schemadir=${glib.makeSchemaPath (placeholder "out") "${pname}-${version}"}" "-Dchrome_nmhdir=${placeholder "out"}/etc/opt/chrome/native-messaging-hosts" "-Dchromium_nmhdir=${placeholder "out"}/etc/chromium/native-messaging-hosts" "-Dopenssl_path=${openssl}/bin/openssl" diff --git a/pkgs/desktops/gnome-3/misc/gpaste/default.nix b/pkgs/desktops/gnome-3/misc/gpaste/default.nix index d8a78686e491..1738c24017c0 100644 --- a/pkgs/desktops/gnome-3/misc/gpaste/default.nix +++ b/pkgs/desktops/gnome-3/misc/gpaste/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { substituteInPlace src/gnome-shell/prefs.js \ --subst-var-by typelibPath "${placeholder "out"}/lib/girepository-1.0" substituteInPlace src/libgpaste/settings/gpaste-settings.c \ - --subst-var-by gschemasCompiled "${placeholder "out"}/share/gsettings-schemas/${pname}-${version}/glib-2.0/schemas" + --subst-var-by gschemasCompiled ${glib.makeSchemaPath "$out" "${pname}-${version}"} ''; nativeBuildInputs = [ diff --git a/pkgs/desktops/pantheon/apps/elementary-files/default.nix b/pkgs/desktops/pantheon/apps/elementary-files/default.nix index ae6583c46720..0decbbc6c7a6 100644 --- a/pkgs/desktops/pantheon/apps/elementary-files/default.nix +++ b/pkgs/desktops/pantheon/apps/elementary-files/default.nix @@ -10,6 +10,7 @@ , desktop-file-utils , libcanberra , gtk3 +, glib , libgee , granite , libnotify @@ -82,7 +83,7 @@ stdenv.mkDerivation rec { patchShebangs meson/post_install.py substituteInPlace filechooser-module/FileChooserDialog.vala \ - --subst-var-by ELEMENTARY_FILES_GSETTINGS_PATH $out/share/gsettings-schemas/${pname}-${version}/glib-2.0/schemas + --subst-var-by ELEMENTARY_FILES_GSETTINGS_PATH ${glib.makeSchemaPath "$out" "${pname}-${version}"} ''; meta = with stdenv.lib; { diff --git a/pkgs/desktops/pantheon/apps/switchboard-plugs/mouse-touchpad/default.nix b/pkgs/desktops/pantheon/apps/switchboard-plugs/mouse-touchpad/default.nix index 00579c545254..c3a88f47af09 100644 --- a/pkgs/desktops/pantheon/apps/switchboard-plugs/mouse-touchpad/default.nix +++ b/pkgs/desktops/pantheon/apps/switchboard-plugs/mouse-touchpad/default.nix @@ -10,6 +10,7 @@ , gtk3 , switchboard , elementary-settings-daemon +, glib }: stdenv.mkDerivation rec { @@ -29,7 +30,7 @@ stdenv.mkDerivation rec { postPatch = '' substituteInPlace src/Views/General.vala \ - --subst-var-by GSD_GSETTINGS ${elementary-settings-daemon}/share/gsettings-schemas/${elementary-settings-daemon.name}/glib-2.0/schemas + --subst-var-by GSD_GSETTINGS ${glib.getSchemaPath elementary-settings-daemon} ''; passthru = { @@ -46,6 +47,7 @@ stdenv.mkDerivation rec { ]; buildInputs = [ + glib granite gtk3 libgee diff --git a/pkgs/desktops/pantheon/apps/switchboard-plugs/pantheon-shell/default.nix b/pkgs/desktops/pantheon/apps/switchboard-plugs/pantheon-shell/default.nix index b9fad17c2f75..a6462150f53a 100644 --- a/pkgs/desktops/pantheon/apps/switchboard-plugs/pantheon-shell/default.nix +++ b/pkgs/desktops/pantheon/apps/switchboard-plugs/pantheon-shell/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, pantheon, meson, ninja, pkgconfig, vala +{ stdenv, fetchFromGitHub, pantheon, meson, ninja, pkgconfig, vala, glib , libgee, granite, gexiv2, elementary-settings-daemon, gtk3, gnome-desktop , gala, wingpanel, plank, switchboard, gettext, bamf, fetchpatch }: @@ -29,9 +29,10 @@ stdenv.mkDerivation rec { buildInputs = [ bamf - gexiv2 - gnome-desktop elementary-settings-daemon + gexiv2 + glib + gnome-desktop granite gtk3 libgee @@ -51,9 +52,9 @@ stdenv.mkDerivation rec { postPatch = '' substituteInPlace src/Views/Appearance.vala \ - --subst-var-by GALA_GSETTINGS_PATH ${gala}/share/gsettings-schemas/${gala.name}/glib-2.0/schemas + --subst-var-by GALA_GSETTINGS_PATH ${glib.getSchemaPath gala} substituteInPlace src/Views/Appearance.vala \ - --subst-var-by WINGPANEL_GSETTINGS_PATH ${wingpanel}/share/gsettings-schemas/${wingpanel.name}/glib-2.0/schemas + --subst-var-by WINGPANEL_GSETTINGS_PATH ${glib.getSchemaPath wingpanel} ''; diff --git a/pkgs/desktops/pantheon/apps/switchboard-plugs/power/default.nix b/pkgs/desktops/pantheon/apps/switchboard-plugs/power/default.nix index 461ddcd3764a..3e43ad61a322 100644 --- a/pkgs/desktops/pantheon/apps/switchboard-plugs/power/default.nix +++ b/pkgs/desktops/pantheon/apps/switchboard-plugs/power/default.nix @@ -11,6 +11,7 @@ , elementary-settings-daemon , granite , gtk3 +, glib , dbus , polkit , switchboard @@ -42,6 +43,7 @@ stdenv.mkDerivation rec { buildInputs = [ dbus + glib granite gtk3 libgee @@ -59,9 +61,9 @@ stdenv.mkDerivation rec { postPatch = '' substituteInPlace src/MainView.vala \ - --subst-var-by DPMS_HELPER_GSETTINGS_PATH ${elementary-dpms-helper}/share/gsettings-schemas/${elementary-dpms-helper.name}/glib-2.0/schemas + --subst-var-by DPMS_HELPER_GSETTINGS_PATH ${glib.getSchemaPath elementary-dpms-helper} substituteInPlace src/MainView.vala \ - --subst-var-by GSD_GSETTINGS_PATH ${elementary-settings-daemon}/share/gsettings-schemas/${elementary-settings-daemon.name}/glib-2.0/schemas + --subst-var-by GSD_GSETTINGS_PATH ${glib.getSchemaPath elementary-settings-daemon} ''; PKG_CONFIG_SWITCHBOARD_2_0_PLUGSDIR = "${placeholder ''out''}/lib/switchboard"; diff --git a/pkgs/desktops/pantheon/apps/switchboard-plugs/security-privacy/default.nix b/pkgs/desktops/pantheon/apps/switchboard-plugs/security-privacy/default.nix index 19967c3bce05..eb50dafb2100 100644 --- a/pkgs/desktops/pantheon/apps/switchboard-plugs/security-privacy/default.nix +++ b/pkgs/desktops/pantheon/apps/switchboard-plugs/security-privacy/default.nix @@ -9,6 +9,7 @@ , libgee , granite , gtk3 +, glib , polkit , zeitgeist , switchboard @@ -41,6 +42,7 @@ stdenv.mkDerivation rec { ]; buildInputs = [ + glib granite gtk3 libgee @@ -60,9 +62,9 @@ stdenv.mkDerivation rec { patchShebangs meson/post_install.py substituteInPlace src/Views/LockPanel.vala \ - --subst-var-by LIGHTLOCKER_GSETTINGS_PATH ${lightlocker}/share/gsettings-schemas/${lightlocker.name}/glib-2.0/schemas + --subst-var-by LIGHTLOCKER_GSETTINGS_PATH ${glib.getSchemaPath lightlocker} substituteInPlace src/Views/FirewallPanel.vala \ - --subst-var-by SWITCHBOARD_SEC_PRIV_GSETTINGS_PATH $out/share/gsettings-schemas/${pname}-${version}/glib-2.0/schemas + --subst-var-by SWITCHBOARD_SEC_PRIV_GSETTINGS_PATH ${glib.makeSchemaPath "$out" "${pname}-${version}"} ''; meta = with stdenv.lib; { diff --git a/pkgs/desktops/pantheon/desktop/elementary-gsettings-schemas/default.nix b/pkgs/desktops/pantheon/desktop/elementary-gsettings-schemas/default.nix index dbcb992c425c..b62fc637ec74 100644 --- a/pkgs/desktops/pantheon/desktop/elementary-gsettings-schemas/default.nix +++ b/pkgs/desktops/pantheon/desktop/elementary-gsettings-schemas/default.nix @@ -33,16 +33,17 @@ with stdenv.lib; # TODO: Having https://github.com/NixOS/nixpkgs/issues/54150 would supersede this runCommand "elementary-gsettings-desktop-schemas" {} '' - mkdir -p $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas - cp -rf ${gsettings-desktop-schemas}/share/gsettings-schemas/gsettings-desktop-schemas*/glib-2.0/schemas/*.xml $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas + schema_dir=$out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas - ${concatMapStrings (pkg: "cp -rf ${pkg}/share/gsettings-schemas/*/glib-2.0/schemas/*.xml $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas\n") gsettingsOverridePackages} + mkdir -p $schema_dir + cp -rf ${glib.getSchemaPath gsettings-desktop-schemas}/*.xml $schema_dir + + ${concatMapStrings (pkg: "cp -rf ${glib.getSchemaPath pkg}/*.xml $schema_dir\n") gsettingsOverridePackages} chmod -R a+w $out/share/gsettings-schemas/nixos-gsettings-overrides - cp ${elementary-default-settings}/share/glib-2.0/schemas/20-io.elementary.desktop.gschema.override \ - $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas + cp ${elementary-default-settings}/share/glib-2.0/schemas/20-io.elementary.desktop.gschema.override $schema_dir - cat - > $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas/nixos-defaults.gschema.override <<- EOF + cat - > $schema_dir/nixos-defaults.gschema.override <<- EOF [org.gnome.desktop.background] picture-uri='${nixos-artwork.wallpapers.simple-dark-gray}/share/artwork/gnome/nix-wallpaper-simple-dark-gray.png' primary-color='#000000' @@ -50,5 +51,5 @@ runCommand "elementary-gsettings-desktop-schemas" {} ${extraGSettingsOverrides} EOF - ${glib.dev}/bin/glib-compile-schemas $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas/ + ${glib.dev}/bin/glib-compile-schemas $schema_dir '' diff --git a/pkgs/tools/networking/network-manager/applet.nix b/pkgs/tools/networking/network-manager/applet.nix index f7df0740ba17..6c70d7ee2a20 100644 --- a/pkgs/tools/networking/network-manager/applet.nix +++ b/pkgs/tools/networking/network-manager/applet.nix @@ -2,7 +2,7 @@ , libnotify, libsecret, polkit, isocodes, modemmanager, libxml2, docbook_xsl, docbook_xml_dtd_43 , mobile-broadband-provider-info, glib-networking, gsettings-desktop-schemas , libgudev, jansson, wrapGAppsHook, gobject-introspection, python3, gtk3 -, libappindicator-gtk3, withGnome ? false, gcr }: +, libappindicator-gtk3, withGnome ? false, gcr, glib }: let pname = "network-manager-applet"; @@ -40,7 +40,7 @@ in stdenv.mkDerivation rec { chmod +x meson_post_install.py # patchShebangs requires executable file patchShebangs meson_post_install.py - substituteInPlace src/wireless-security/eap-method.c --subst-var-by NM_APPLET_GSETTINGS $lib/share/gsettings-schemas/${name}/glib-2.0/schemas + substituteInPlace src/wireless-security/eap-method.c --subst-var-by NM_APPLET_GSETTINGS ${glib.makeSchemaPath "$lib" name} ''; passthru = {