Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deepin.dde-dock: init at 4.9.8 #59244

Merged
merged 1 commit into from May 2, 2019
Merged

deepin.dde-dock: init at 4.9.8 #59244

merged 1 commit into from May 2, 2019

Conversation

romildo
Copy link
Contributor

@romildo romildo commented Apr 10, 2019

Motivation for this change

Add dde-dock, a dock for Deepin Desktop Environment.

About packaging deepin for NixOS: #59023

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@romildo
Copy link
Contributor Author

romildo commented Apr 10, 2019

This is a dependency for dde-file-manager.

@worldofpeace
Copy link
Contributor

So at a glance there is a plugins system that wants to load them from a directory

/usr/lib/dde-dock/plugins/

I think two most popular things to do in nixpkgs for this kind of thing are

  1. have it load from directory /run/current-system/sw/lib/dde-dock/plugins
  2. load a directory from the value of an environment variable
    I've used this one in practice

And possibly some others that I haven't thought of.

@romildo
Copy link
Contributor Author

romildo commented Apr 10, 2019

@GrahamcOfBorg build deepin.dde-dock

@romildo romildo requested a review from infinisil as a code owner April 14, 2019 20:08
@romildo romildo changed the title deepin.dde-dock: init at 4.9.4 deepin.dde-dock: init at 4.9.6 Apr 14, 2019
@infinisil
Copy link
Member

See also #59560 (comment)

@romildo romildo changed the title deepin.dde-dock: init at 4.9.6 deepin.dde-dock: init at 4.9.8 Apr 19, 2019
@romildo
Copy link
Contributor Author

romildo commented Apr 19, 2019

I have removed the NixOS module from this PR. The dbus service may be added again in a new PR that will try to better handle the deepin module(s).

@romildo
Copy link
Contributor Author

romildo commented Apr 19, 2019

So at a glance there is a plugins system that wants to load them from a directory

/usr/lib/dde-dock/plugins/

I think two most popular things to do in nixpkgs for this kind of thing are

  1. have it load from directory /run/current-system/sw/lib/dde-dock/plugins
  2. load a directory from the value of an environment variable
    I've used this one in practice

And possibly some others that I haven't thought of.

@worldofpeace I have patched the source to use the DDE_DOCK_PLUGINS_DIR environment variable to find plugins. The variable should then be set in the forthcoming desktop module.

@romildo
Copy link
Contributor Author

romildo commented Apr 20, 2019

The following packages also have similar plugins systems:

  • dde-polkit-agent (in C++ and Qt):
    I have a similar fix in a forthcoming PR
  • deepin-wm (in Vala):
    Although I do not know Vala, I have tried to write a similar fix in a forthcoming PR. The plugins dir can be set at compilation time.
  • deepin-mutter (in C and glib):
    I have a similar fix in a forthcoming PR. The plugins dir can be set at compilation time.

For deepin-wm and deepin-mutter approach 1 may be easier.

@worldofpeace
Copy link
Contributor

Added a wrapper, we probably should package a plugin to test it.

There's a hardcoded path at share/polkit-1/actions/com.deepin.dde.dock.overlay.policy

<annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/overlayroot-disable</annotate>
<annotate key="org.freedesktop.policykit.exec.path">/sbin/overlayroot-disable</annotate>

Don't know what that's about.

@romildo
Copy link
Contributor Author

romildo commented Apr 22, 2019

Added a wrapper,

I was originally thinking in defining the following in the deepin desktop manager module:

  environment.variables.DDE_DOCK_PLUGINS_DIR = [ "${config.system.path}/lib/dde-dock/plugins" ];
  environment.pathsToLink = [ "/lib/dde-dock/plugins" ];

instead of wrapping. It is a simpler technique already in use in nixos.

we probably should package a plugin to test it.

dde-file-manager includes lib/dde-dock/plugins/system-trays/libdde-disk-mount-plugin.so

There's a hardcoded path at share/polkit-1/actions/com.deepin.dde.dock.overlay.policy

<annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/[overlayroot-disable](url)</annotate>
<annotate key="org.freedesktop.policykit.exec.path">/sbin/overlayroot-disable</annotate>

Don't know what that's about.

Protecting the Root Filesystem on Ubuntu with Overlayroot is about overlayroot. I do not know details about it.

@worldofpeace
Copy link
Contributor

I was originally thinking in defining the following in the deepin desktop manager module:
instead of wrapping. It is a simpler technique already in use in nixos.

I think, in general, relying on the global environment like that is best to be avoided.

@romildo romildo merged commit ea1d595 into NixOS:master May 2, 2019
@romildo romildo deleted the upd.deepin.dde-dock branch May 2, 2019 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants