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: update packages and add desktop module #92625

Closed
wants to merge 47 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
3ec76f8
nixos/desktops/deepin: enable dconf
romildo Jul 2, 2020
f0e07a7
nixos/desktops/deepin: enable gvfs
romildo Jul 2, 2020
66053b9
nixos/desktops/deepin: enable udisks2
romildo Jul 2, 2020
4609228
nixos/desktops/deepin: new option programs.dde-calendar.enable
romildo Jun 16, 2020
02417b4
nixos/desktops/deepin: override dde-dock to include plugins
romildo Jul 8, 2020
963ddb0
deepin.dde-daemon: sort dependence list
romildo May 28, 2020
5dedfdd
deepin.deepin-shortcut-viewer: 5.0.0 -> 5.0.2
romildo May 27, 2020
e2601df
deepin.deepin-menu: 3.4.8 -> 5.0.1
romildo May 27, 2020
42be6b7
deepin.deepin-movie-reborn: 5.0.0 -> 5.7.6.29
romildo May 27, 2020
afe7a9e
deepin.dde-network-utils: 5.0.1 -> 6.1.0101.1
romildo May 28, 2020
91db473
deepin.deepin-sound-theme: 15.10.3 -> 15.10.6
romildo May 28, 2020
79a9d3e
deepin.deepin-image-viewer: 5.0.0 -> 5.6.3.2
romildo May 28, 2020
6f42fdd
deepin.gio-qt: init at 0.0.9
romildo May 28, 2020
53f0a29
deepin.dde-dock: 5.0.0 -> 5.1.0.11
romildo May 28, 2020
4b67ba1
deepin.deepin-gtk-theme: 17.10.11 -> 2020.06.10
romildo Jun 11, 2020
5b8c48e
deepin.dde-file-manager: 5.0.0 -> 5.1.1.25
romildo May 28, 2020
e35d0d4
deepin.setupHook: search hard coded paths in a single pass
romildo Jun 13, 2020
7344f29
deepin.deepin-screen-recorder: init at 5.8.0.11
romildo Jun 13, 2020
1418845
deepin.dde-kwin: 5.0.0 -> 5.1.0.4
romildo May 28, 2020
69bf57f
deepin.go-lib: 5.4.5 -> 5.5.0.1
romildo Jun 15, 2020
fd7ddb0
deepin.dde-polkit-agent: 5.0.0 -> 5.2.0.7
romildo May 27, 2020
ff76b49
deepin.go-dbus-factory: 0.9.0 -> 1.7.0.6
romildo May 28, 2020
66dc744
deepin.dtkgui: init at 5.2.2.1
romildo May 27, 2020
657afaf
deepin.deepin-anything: 5.0.1 -> 5.0.1-1
romildo Jul 10, 2020
bc3dfbc
deepin.deepin-desktop-base: 2019.07.10 -> 2020.07.31
romildo May 28, 2020
6c9ccb5
deepin.deepin-icon-theme: 2020.05.21 -> 2020.07.24
romildo May 28, 2020
26c74b3
deepin.dpa-ext-gnomekeyring: 5.0.1 -> 5.0.2
romildo Aug 7, 2020
aa88848
deepin.dtkcore: 2.1.1 -> 5.2.2.3
romildo May 26, 2020
1a58359
deepin.dtkwidget: 2.1.1 -> 5.2.2.3
romildo May 27, 2020
f702fbb
deepin.dde-calendar: 5.0.1 -> 5.7.0.5
romildo Jul 7, 2020
3017a53
deepin.dde-daemon: 5.0.0 -> 5.11.0.33
romildo May 28, 2020
6bfd0ce
deepin.dde-control-center: 5.0.0 -> 5.3.0.9
romildo Jul 7, 2020
fd65db4
deepin.dde-launcher: 5.0.0 -> 5.3.0.5
romildo May 28, 2020
2449acd
deepin.dde-qt-dbus-factory: 5.0.1 -> 5.3.0.4
romildo May 27, 2020
34d3995
deepin.dde-session-shell: init at 5.3.0.5
romildo Jun 16, 2020
bb7c34a
deepin.dde-session-ui: 5.0.0 -> 5.3.0.2
romildo May 28, 2020
e81cf6a
deepin.deepin-calculator: 5.0.1 -> 5.5.28
romildo May 28, 2020
0f901bc
deepin.deepin-desktop-schemas: 3.13.9 -> 5.8.0.5
romildo May 28, 2020
0e95287
deepin.deepin-editor: 1.2.9.1 -> 5.6.28
romildo May 27, 2020
4dd1694
deepin.deepin-terminal: 5.0.0 -> 5.2.22
romildo May 28, 2020
d4471a1
deepin.qt5integration: 5.0.0 -> 5.1.0.4
romildo May 27, 2020
053c04d
deepin.qt5platform-plugins: 5.0.11 -> 5.0.15
romildo Jun 25, 2020
011c6af
deepin.startdde: 5.0.1 -> 5.5.0.13
romildo May 28, 2020
513d95f
deepin.udisks2-qt5: 5.0.3 -> 5.0.4
romildo Aug 18, 2020
8c2800e
deepin.dde-api: 5.0.0 -> 5.3.0.4
romildo May 28, 2020
83d2858
nixos/deepin: add nixos desktop service
romildo Nov 12, 2018
07c887b
nixos/tests: add deepin test
romildo Jul 9, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions nixos/modules/services/desktops/deepin/deepin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
that helps to launch applications faster.
";

programs.dde-calendar.enable = lib.mkEnableOption "Deepin calendar";

};


Expand All @@ -30,12 +32,18 @@
config = lib.mkMerge [

(lib.mkIf config.services.deepin.core.enable {

programs.dconf.enable = true;

services.gvfs.enable = true;

services.udisks2.enable = true;

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-dock.override { plugins = [ pkgs.deepin.dde-file-manager ]; })
pkgs.deepin.dde-launcher
pkgs.deepin.dde-file-manager
pkgs.deepin.dde-session-ui
Expand All @@ -45,10 +53,9 @@

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-dock.override { plugins = [ pkgs.deepin.dde-file-manager ]; })
pkgs.deepin.dde-launcher
pkgs.deepin.dde-file-manager
pkgs.deepin.dde-session-ui
Expand Down Expand Up @@ -107,6 +114,7 @@

services.deepin.deepin-menu.enable = true;
services.deepin.deepin-turbo.enable = true;
programs.dde-calendar.enable = true;
})

(lib.mkIf config.services.deepin.deepin-menu.enable {
Expand All @@ -118,6 +126,11 @@
systemd.packages = [ pkgs.deepin.deepin-turbo ];
})

(lib.mkIf config.programs.dde-calendar.enable {
environment.systemPackages = [ pkgs.deepin.dde-calendar ];
services.dbus.packages = [ pkgs.deepin.dde-calendar ];
})

];

}
86 changes: 86 additions & 0 deletions nixos/modules/services/x11/desktop-managers/deepin.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{ config, lib, pkgs, ... }:

with lib;

let

xcfg = config.services.xserver;
cfg = xcfg.desktopManager.deepin;

in

{
options = {

services.xserver.desktopManager.deepin.enable = mkOption {
type = types.bool;
default = false;
description = "Enable the Deepin Desktop Environment";
};

};


config = mkIf (xcfg.enable && cfg.enable) {

services.xserver.displayManager.sessionPackages = [ pkgs.deepin.startdde ];
services.xserver.displayManager.defaultSession = mkForce "deepin";

hardware.bluetooth.enable = mkDefault true;
hardware.pulseaudio.enable = mkDefault true;
security.polkit.enable = true;
services.accounts-daemon.enable = true;
services.bamf.enable = true;
services.deepin.core.enable = true;
services.gnome3.at-spi2-core.enable = true;
services.gnome3.glib-networking.enable = true;
services.gnome3.gnome-keyring.enable = true;
services.gvfs.enable = true;
services.udisks2.enable = true;
services.upower.enable = config.powerManagement.enable;
services.xserver.libinput.enable = mkDefault true;
services.xserver.updateDbusEnvironment = true;

networking.networkmanager.enable = true;

fonts.fonts = with pkgs; [ noto-fonts ];

environment.systemPackages = with pkgs; [
deepin.dde-calendar
deepin.dde-daemon
(deepin.dde-dock.override { plugins = [ deepin.dde-file-manager ]; })
deepin.dde-kwin
deepin.dde-file-manager
deepin.dde-launcher
deepin.dde-polkit-agent
deepin.dde-session-shell
deepin.dde-session-ui
deepin.deepin-desktop-base
deepin.deepin-gtk-theme
deepin.deepin-icon-theme
deepin.deepin-image-viewer
deepin.deepin-movie-reborn
deepin.deepin-screen-recorder
deepin.deepin-shortcut-viewer
deepin.deepin-sound-theme
deepin.deepin-terminal
deepin.deepin-wallpapers
deepin.dpa-ext-gnomekeyring
deepin.qt5integration
deepin.qt5platform-plugins
deepin.startdde
];

environment.variables.DDE_POLKIT_PLUGINS_DIRS = [ "${config.system.path}/lib/polkit-1-dde/plugins" ];

environment.variables.NIX_GSETTINGS_OVERRIDES_DIR = [
"${pkgs.deepin.deepin-desktop-schemas}/share/gsettings-schemas/${pkgs.deepin.deepin-desktop-schemas.name}/glib-2.0/schemas"
];

# Link some extra directories in /run/current-system/sw/share
environment.pathsToLink = [
"/lib/polkit-1-dde/plugins"
"/share"
];
};
}
2 changes: 1 addition & 1 deletion nixos/modules/services/x11/desktop-managers/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ in
imports = [
./none.nix ./xterm.nix ./xfce.nix ./plasma5.nix ./lumina.nix
./lxqt.nix ./enlightenment.nix ./gnome3.nix ./kodi.nix
./mate.nix ./pantheon.nix ./surf-display.nix ./cde.nix
./mate.nix ./pantheon.nix ./deepin.nix ./surf-display.nix ./cde.nix
];

options = {
Expand Down
98 changes: 98 additions & 0 deletions nixos/tests/deepin.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
import ./make-test-python.nix ({ pkgs, ...} :
{
name = "deepin";

meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ romildo ];
};

machine = { ... }:
{
imports = [ ./common/user-account.nix ];
services.xserver.enable = true;
services.xserver.desktopManager.deepin.enable = true;
services.xserver.displayManager.lightdm = {
enable = true;
autoLogin = {
enable = true;
user = "alice";
};
};
hardware.pulseaudio.enable = true; # needed for the factl test, /dev/snd/* exists without them but udev doesn't care then
virtualisation.diskSize = 1024;
virtualisation.memorySize = 1024;
environment.systemPackages = [ pkgs.xdotool ];
services.acpid.enable = true;
networking.useNetworkd = true;
};

enableOCR = true;

testScript = { nodes, ... }: let
user = nodes.machine.config.users.users.alice;
in ''
with subtest("Ensure X starts"):
machine.wait_for_x()
machine.wait_for_file("${user.home}/.Xauthority")
machine.succeed("xauth merge ${user.home}/.Xauthority")

with subtest("Check that logging in has given the user ownership of devices"):
machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}")

with subtest("Effect mode"):
# geeqie: image viewer which shows coordinate of pixels
machine.wait_for_text("Friendly Reminder") # Effect/Normal mode
machine.screenshot("deepin1")
machine.succeed("xdotool mousemove 512 480 click 1") # Normal mode

with subtest("Open Deepin Terminal"):
machine.screenshot("deepin2a")
machine.sleep(60)
machine.screenshot("deepin2b")
machine.sleep(60)
machine.screenshot("deepin2c")
# machine.sleep(60)
# machine.screenshot("deepin2d")
# machine.sleep(60)
# machine.screenshot("deepin2e")
# machine.sleep(60)
# machine.screenshot("deepin2f")
# machine.sleep(60)
# machine.screenshot("deepin2g")
# machine.sleep(60)
# machine.screenshot("deepin2h")
# machine.sleep(60)
# machine.screenshot("deepin2i")
# machine.sleep(60)
# machine.screenshot("deepin2j")
# machine.sleep(60)
# machine.screenshot("deepin2k")
# machine.sleep(60)
# machine.screenshot("deepin2l")
# machine.sleep(60)
# machine.screenshot("deepin2m")
# machine.sleep(60)
# machine.screenshot("deepin2n")
# machine.sleep(60)
# machine.screenshot("deepin2o")
# machine.sleep(60)
# machine.screenshot("deepin2p")
# machine.sleep(60)
# machine.screenshot("deepin2q")
# machine.sleep(60)
# machine.screenshot("deepin2r")
# machine.sleep(60)
# machine.screenshot("deepin2s")
# machine.sleep(60)
# machine.screenshot("deepin2t")
# machine.sleep(60)
# machine.screenshot("deepin2u")
# machine.sleep(60)
# machine.screenshot("deepin2v")
machine.succeed("deepin-terminal &")
machine.sleep(20)
machine.send_chars("ls --color -alF\n")
machine.sleep(20)
machine.screenshot("deepin3")
'';
})
46 changes: 32 additions & 14 deletions pkgs/desktops/deepin/dde-api/default.nix
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
{ stdenv
, buildGoPackage
, fetchFromGitHub
, pkgconfig
, pkg-config
, alsaLib
, bc
, blur-effect
, coreutils
, dbus
, deepin
, deepin-gettext-tools
, fontconfig
, gdk-pixbuf-xlib
, go
, go-dbus-factory
, go-gir-generator
Expand All @@ -26,41 +28,42 @@

buildGoPackage rec {
pname = "dde-api";
version = "5.0.0";
version = "5.3.0.4";

goPackagePath = "pkg.deepin.io/dde/api";

src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "0iv4krj6dqdknwvmax7aj40k1h96259kqcfnljadrwpl7cvsvp5p";
sha256 = "1fh2g4alskd8h80d19r7h9hi26dz8cl7hmy2l75x95ni22z180zf";
};

goDeps = ./deps.nix;

nativeBuildInputs = [
pkgconfig
pkg-config
go-dbus-factory
go-gir-generator
go-lib
deepin-gettext-tools # build
deepin.setupHook

# TODO: using $PATH to find run time executable does not work with cross compiling
bc # run (to adjust grub theme?)
blur-effect # run (is it really needed?)
coreutils # run (is it really needed?)
fontconfig # run (is it really needed?)
rfkill # run
xcur2png # run
grub2 # run (is it really needed?)
];

buildInputs = [
go-dbus-factory # needed
go-gir-generator # needed
go-lib # build

alsaLib # needed
coreutils
dbus
#glib # ? arch
gdk-pixbuf-xlib # needed
gtk3 # build run
libcanberra # build run
libgudev # needed
Expand All @@ -85,8 +88,19 @@ buildGoPackage rec {
misc/systemd/system/deepin-shutdown-sound.service \
theme_thumb/gtk/gtk.go \
thumbnails/gtk/gtk.go
fixPath $out /boot/grub Makefile # TODO: confirm where to install grub themes
fixPath $out /var Makefile

fixPath $out /usr/share/dde-api \
adjust-grub-theme/main.go \
language_support/lang_support.go \
lunar-calendar/huangli.go

fixPath $out /boot/grub adjust-grub-theme/main.go # TODO: confirm where to install grub themes

fixPath ${dbus} /usr/bin/dbus-send misc/systemd/system/deepin-login-sound.service
fixPath ${coreutils} /usr/bin/true misc/systemd/system/deepin-shutdown-sound.service

# TODO: consider XDG_DATA_DIRS and XDG_DATA_HOME
substituteInPlace themes/theme.go --replace /usr/share /run/current-system/sw/share

# This package wants to install polkit local authority files into
# /var/lib. Nix does not allow a package to install files into /var/lib
Expand All @@ -96,12 +110,17 @@ buildGoPackage rec {
# /var/lib/polkit-1 (with /etc having priority over /var/lib). An
# work around is to install them to $out/etc and simlnk them to
# /etc in the deepin module.

sed -i -e "s,/var/lib/polkit-1,/etc/polkit-1," Makefile
#
sed -i -e "s,/var/lib/polkit-1,$out/etc/polkit-1," Makefile
'';

buildPhase = ''
export GOPATH="$GOPATH:${go-dbus-factory}/share/go"
export GOPATH="$GOPATH:${go-lib}/share/go"
export GOPATH="$GOPATH:${go-gir-generator}/share/go"

export GOCACHE="$TMPDIR/go-cache";

make -C go/src/${goPackagePath}
'';

Expand All @@ -123,6 +142,5 @@ buildGoPackage rec {
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ romildo ];
broken = true; # 2020-08-22 https://hydra.nixos.org/build/125354866/nixlog/2
};
}
Loading