Merge pull request #330634 from r-ryantm/auto-update/circumflex
[NixPkgs.git] / pkgs / desktops / gnome / core / gnome-shell / wrap-services.patch
blobeca485c3212447d555fb19aa1a810d2c473196f9
1 diff --git a/js/dbusServices/dbus-service.in b/js/dbusServices/dbus-service.in
2 old mode 100644
3 new mode 100755
4 index 5c698f58a..1ed61a7e3
5 --- a/js/dbusServices/dbus-service.in
6 +++ b/js/dbusServices/dbus-service.in
7 @@ -1,3 +1,9 @@
8 +#!@gjs@ -m
10 +// gjs determines the package name from argv[0], which is .*-wrapped
11 +// so we need to override it to the original one.
12 +imports.package._findEffectiveEntryPointName = () => '@service@'
14 import {programInvocationName, programArgs} from 'system';
16 imports.package.init({
17 diff --git a/js/dbusServices/dbus-service.service.in b/js/dbusServices/dbus-service.service.in
18 index 3b0d09abe..4fd4bb66d 100644
19 --- a/js/dbusServices/dbus-service.service.in
20 +++ b/js/dbusServices/dbus-service.service.in
21 @@ -1,3 +1,3 @@
22 [D-BUS Service]
23 Name=@service@
24 -Exec=@gjs@ -m @pkgdatadir@/@service@
25 +Exec=@pkgdatadir@/@service@
26 diff --git a/js/dbusServices/meson.build b/js/dbusServices/meson.build
27 index eb941ed90..552051e5a 100644
28 --- a/js/dbusServices/meson.build
29 +++ b/js/dbusServices/meson.build
30 @@ -2,6 +2,7 @@ launcherconf = configuration_data()
31 launcherconf.set('PACKAGE_NAME', meson.project_name())
32 launcherconf.set('prefix', prefix)
33 launcherconf.set('libdir', libdir)
34 +launcherconf.set('gjs', gjs.full_path())
36 dbus_services = {
37 'org.gnome.Shell.Extensions': 'extensions',
38 @@ -18,16 +19,17 @@ endif
39 config_dir = '@0@/..'.format(meson.current_build_dir())
41 foreach service, dir : dbus_services
42 + svc_launcherconf = launcherconf
43 + svc_launcherconf.set('service', service)
44 configure_file(
45 input: 'dbus-service.in',
46 output: service,
47 - configuration: launcherconf,
48 + configuration: svc_launcherconf,
49 install_dir: pkgdatadir,
52 serviceconf = configuration_data()
53 serviceconf.set('service', service)
54 - serviceconf.set('gjs', gjs.full_path())
55 serviceconf.set('pkgdatadir', pkgdatadir)
57 configure_file(