NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.87k stars 13.94k forks source link

Packaging the Deepin Desktop Environment #59023

Closed romildo closed 4 years ago

romildo commented 5 years ago

The Deepin Desktop Environment (DDE) is an elegant and easy to use desktop environment of the Chinese Deepin Linux distribution.

The purpose of this issue is to list the packages needed to have DDE in NixOS, as well as to discuss ideas on the process of packaging them.

Some of them have already been packaged.

Packages:

Extra packages:

Services;

Debugging:

Issues:

cc @worldofpeace

romildo commented 5 years ago

59038 adds dde-network-utils.

romildo commented 5 years ago

https://github.com/NixOS/nixpkgs/pull/59092 adds deepin.qcef (Qt5 binding of Chromium Embedded Framework), a dependency for the forthcoming deepin manual.

worldofpeace commented 5 years ago

@romildo Do you have an expression for deepin-screenshot?

Just checking so I don't duplicate one if you have it and just haven't pr'd it.

romildo commented 5 years ago

Yes, I have. I will open a PR for it.

romildo commented 5 years ago

@worldofpeace When a package has associated dbus services, systemd services, kernel modules, and/or specific groups and users, it deserves a NixOS module, like I have been doing, right?

The alternative would be having a unique module for the entire DDE, which would enable those services and kernel modules, and create groups and users for all deepin packages in a single place.

It seems that GNOME is going from something like this second alternative to the first one alternative.

worldofpeace commented 5 years ago

The alternative would be having a unique module for the entire DDE, which would enable those services and kernel modules, and create groups and users for all deepin packages in a single place.

It seems that GNOME is going from something like this second alternative to the first one alternative.

So with GNOME, lots of the pieces need to be shared. For example, gnome-settings-daemon has many forks so it has a package option. Plus lots of optional services. That's why we're planing on having https://github.com/NixOS/nixpkgs/pull/54415

Now with deepin I think there should be individual modules for applications if needed (deepin-screenshot, etc.). But for the really lower level services, (dde-api, dde-daemon), they only make sense to be enabled if you're using the DE. It's just not flexible like that. And if someone would disable them it would just break, so having an individual options isn't useful.

So having

The alternative would be having a unique module for the entire DDE, which would enable those services and kernel modules, and create groups and users for all deepin packages in a single place.

for the tightly coupled stuff makes sense to me.

worldofpeace commented 5 years ago
Note: discussion on IRC is convenient to me for further discussion
worldofpeace commented 5 years ago

I've drafted a dde-control-center expression

but haven't had time to make it build.

perhaps it has to do with this https://src.fedoraproject.org/rpms/deepin-control-center/blob/master/f/deepin-control-center.spec#_49 ?
romildo commented 5 years ago

I've drafted a dde-control-center expression [...] but haven't had time to make it build.

I have tried your expression, and it fails to build for me too.

perhaps it has to do with this https://src.fedoraproject.org/rpms/deepin-control-center/blob/master/f/deepin-control-center.spec#_49 ?

I think this is not related. This is just Fedora fixing the lib dir to fit its file system layout.

I have found that somehow dtkcore is installing a older version of the library:

$ grep VERSION /nix/store/8kpivw2m04mx1p7ja1b8fgr3bxbw0lmv-dtkcore-2.0.14/include/libdtk-2.0.6/DCore/dtkcore_config.h
#define DTK_VERSION_MAJOR 2
#define DTK_VERSION_MINOR 0
#define DTK_VERSION_PATCH 6
#define DTK_VERSION_BUILD 0
#define DTK_VERSION_STR "2.0.6"

and as a consequence the test at https://github.com/linuxdeepin/dde-control-center/blob/master/src/frame/modules/sound/soundworker.h#L121 is evaluating to true, and an aditional header file is included, exactly where an error is being reported:

In file included from /nix/store/bzh7jppvdzbqscw7zl40w467ljik5ivk-qtbase-5.12.0-dev/include/QtCore/qobject.h:54:0,
                 from /nix/store/bzh7jppvdzbqscw7zl40w467ljik5ivk-qtbase-5.12.0-dev/include/QtWidgets/qwidget.h:45,
                 from /nix/store/bzh7jppvdzbqscw7zl40w467ljik5ivk-qtbase-5.12.0-dev/include/QtWidgets/QWidget:1,
                 from /build/source/src/frame/widgets/contentwidget.h:29,
                 from /build/source/src/frame/settingswidget.h:29,
                 from /build/source/src/frame/settingswidget.cpp:26:
/build/source/src/frame/modules/sound/soundworker.h:122:5: error: redefinition of 'struct QMetaTypeId<Dtk::Widget::DDesktopServices::SystemSoundEffect>'
romildo commented 5 years ago

With https://github.com/NixOS/nixpkgs/pull/63795 dde-control-center building succeeds locally.

worldofpeace commented 5 years ago

With #63795 dde-control-center building succeeds locally.

Cool, I should be able to pr that properly now :+1:

romildo commented 5 years ago

With #63795 dde-control-center building succeeds locally.

Cool, I should be able to pr that properly now +1

Remeber to add the dbus service to the nixos module:

 nixos/modules/services/desktops/deepin/deepin.nix | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/nixos/modules/services/desktops/deepin/deepin.nix b/nixos/modules/services/desktops/deepin/deepin.nix
index d9d5d539e42..d45fa638ef4 100644
--- a/nixos/modules/services/desktops/deepin/deepin.nix
+++ b/nixos/modules/services/desktops/deepin/deepin.nix
@@ -33,6 +33,7 @@
       environment.systemPackages = [
         pkgs.deepin.dde-api
         pkgs.deepin.dde-calendar
+        pkgs.deepin.dde-control-center
         pkgs.deepin.dde-daemon
         pkgs.deepin.dde-dock
         pkgs.deepin.dde-file-manager
@@ -45,6 +46,7 @@
       services.dbus.packages = [
         pkgs.deepin.dde-api
         pkgs.deepin.dde-calendar
+        pkgs.deepin.dde-control-center
         pkgs.deepin.dde-daemon
         pkgs.deepin.dde-dock
         pkgs.deepin.dde-file-manager
-- 
2.22.0
worldofpeace commented 5 years ago

@romildo I think this could be a very informative read for us https://github.com/linuxdeepin/developer-center/issues/1093 (particularly on there frequent releases)

They seem to move at a very fast rate and I'm wondering how we can align this in our release process to get the best experience for the end user.

romildo commented 5 years ago

@romildo I think this could be a very informative read for us linuxdeepin/developer-center#1093 (particularly on there frequent releases)

They seem to move at a very fast rate and I'm wondering how we can align this in our release process to get the best experience for the end user.

Summarizing: they release new versions of packages very fast, without any indication of stability. Sometimes the released code is unstable. That is making packagers (mainly of archlinux derivative distributions) unhappy.

If there was a way of telling which releases are stable, it would be simpler. For now we can complete the packaging of DDE so that we can use it ourselves for testing, and fixing packaging issues. We can try to update frequently and test the desktop environment to check that it mostly works.

romildo commented 5 years ago

@worldofpeace Any idea on how to handle a package that originally install files at /var?

All files installed by dde-account-faces are placed at /var/lib/AccountsService/icons/.

Other packages look for them at that location:

$ grep --color -r '/var/lib/AccountsService'
dde-daemon/accounts/manager.go: actConfigDir       = "/var/lib/AccountsService"
dde-daemon/accounts/user.go:    defaultUserIcon          = "file:///var/lib/AccountsService/icons/default.png"
dde-control-center/src/frame/modules/accounts/modifyavatarpage.cpp:        if (avatar.startsWith("file:///var/lib/AccountsService/icons/local"))
dde-session-ui/global_util/constants.h:static const QString CONFIG_FILE("/var/lib/AccountsService/users/");
worldofpeace commented 5 years ago

So I'm half guessing that they want you to be able to modify the user icon in dde-control-center using the icons there. And dde-daemon wants to set their default icon.

I don't think any of these things would require them to install files to /var/lib/AccountsService/icons because the dbus api has SetIconFile.

worldofpeace commented 5 years ago

It looks like wrappers for qt have been merged #54525. When that hits master we should probably wrap the qt applications in deepin.

Ninlives commented 4 years ago

Is this still under development?

worldofpeace commented 4 years ago

The final piece should be here https://github.com/NixOS/nixpkgs/pull/63813, through since the switch to kwin it's no longer working.

stale[bot] commented 4 years ago

Thank you for your contributions. This has been automatically marked as stale because it has had no activity for 180 days. If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity. Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse. 3. Ask on the #nixos channel on irc.freenode.net.
romildo commented 4 years ago

Still in progress.

romildo commented 4 years ago

Packaging of the Deepin Desktop Environment has been cancelled (https://github.com/NixOS/nixpkgs/issues/94870). Closing.