mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 15:33:13 +00:00
cinnamon.nemo: Fix open as root
Open as root support is added in src/nemo-view.c as `pkexec nemo`. This does not match the full path in `org.nemo.root.policy` so it doesn't work. Replacing with `/run/current-system/sw/bin/nemo` seems to be the easiest solution here, otherwise to properly support nemo-with-extensions, we likely need to patch everything that calls `pkexec nemo` to accept external environment variables for nemo path, and pass the path via wrapper, and we still need to substitute `org.nemo.root.policy` in nemo-with-extensions.
This commit is contained in:
parent
b06025f153
commit
8eefcdc9e9
@ -67,6 +67,13 @@ stdenv.mkDerivation rec {
|
|||||||
"--localedir=${cinnamon-translations}/share/locale"
|
"--localedir=${cinnamon-translations}/share/locale"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
# This fixes open as root and handles nemo-with-extensions well.
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/297570
|
||||||
|
substituteInPlace $out/share/polkit-1/actions/org.nemo.root.policy \
|
||||||
|
--replace-fail "$out/bin/nemo" "/run/current-system/sw/bin/nemo"
|
||||||
|
'';
|
||||||
|
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
# Used for some non-fd.o icons (e.g. xapp-text-case-symbolic)
|
# Used for some non-fd.o icons (e.g. xapp-text-case-symbolic)
|
||||||
gappsWrapperArgs+=(
|
gappsWrapperArgs+=(
|
||||||
|
Loading…
Reference in New Issue
Block a user