diff --git a/nixos/modules/services/desktops/deepin/deepin.nix b/nixos/modules/services/desktops/deepin/deepin.nix index f8fb73701af69..fb3764b62c897 100644 --- a/nixos/modules/services/desktops/deepin/deepin.nix +++ b/nixos/modules/services/desktops/deepin/deepin.nix @@ -22,6 +22,8 @@ that helps to launch applications faster. "; + programs.dde-calendar.enable = lib.mkEnableOption "Deepin calendar"; + }; @@ -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 @@ -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 @@ -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 { @@ -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 ]; + }) + ]; } diff --git a/nixos/modules/services/x11/desktop-managers/deepin.nix b/nixos/modules/services/x11/desktop-managers/deepin.nix new file mode 100644 index 0000000000000..6b9bc74655f6b --- /dev/null +++ b/nixos/modules/services/x11/desktop-managers/deepin.nix @@ -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" + ]; + }; +} diff --git a/nixos/modules/services/x11/desktop-managers/default.nix b/nixos/modules/services/x11/desktop-managers/default.nix index 5d3a84d713994..6c7c587058f7d 100644 --- a/nixos/modules/services/x11/desktop-managers/default.nix +++ b/nixos/modules/services/x11/desktop-managers/default.nix @@ -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 = { diff --git a/nixos/tests/deepin.nix b/nixos/tests/deepin.nix new file mode 100644 index 0000000000000..35a82585eeb88 --- /dev/null +++ b/nixos/tests/deepin.nix @@ -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") + ''; +}) diff --git a/pkgs/desktops/deepin/dde-api/default.nix b/pkgs/desktops/deepin/dde-api/default.nix index 95e38a86416c0..56d9545076421 100644 --- a/pkgs/desktops/deepin/dde-api/default.nix +++ b/pkgs/desktops/deepin/dde-api/default.nix @@ -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 @@ -26,7 +28,7 @@ buildGoPackage rec { pname = "dde-api"; - version = "5.0.0"; + version = "5.3.0.4"; goPackagePath = "pkg.deepin.io/dde/api"; @@ -34,20 +36,22 @@ buildGoPackage rec { 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 @@ -55,12 +59,11 @@ buildGoPackage rec { ]; 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 @@ -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 @@ -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} ''; @@ -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 }; } diff --git a/pkgs/desktops/deepin/dde-api/deps.nix b/pkgs/desktops/deepin/dde-api/deps.nix index 5ebe1f6af952f..587db3a682bb5 100644 --- a/pkgs/desktops/deepin/dde-api/deps.nix +++ b/pkgs/desktops/deepin/dde-api/deps.nix @@ -32,8 +32,8 @@ fetch = { type = "git"; url = "https://github.com/disintegration/imaging"; - rev = "9aab30e6aa535fe3337b489b76759ef97dfaf362"; - sha256 = "015amm3x989hl3r4gxnixj602fl9j8z53n0lrq804cbfbk7a31fw"; + rev = "339f5d48a4f3352fe8bcdefe81de01e25f711b09"; + sha256 = "0hv0bf37ljinn880bn5kbvlgsghjdvnzk913q8h63lzi2pydvhl2"; }; } { @@ -41,8 +41,17 @@ fetch = { type = "git"; url = "https://github.com/fogleman/gg"; - rev = "4dc34561c649343936bb2d29e23959bd6d98ab12"; - sha256 = "1x1finzdrr80dd3r7wvf7zb184yjf4dawz7s581p2dr64dcialww"; + rev = "ad4d1eafac46916fde6a6b375f7389e555f7e040"; + sha256 = "16shysv6j3qfm4aryk29m5vcwd250h1cf72f4a6pgw606j3fi0zs"; + }; + } + { + goPackagePath = "github.com/godbus/dbus"; + fetch = { + type = "git"; + url = "https://github.com/godbus/dbus"; + rev = "efee8394fa9a426004eb24eed1dee80f5efd90af"; + sha256 = "1wjbkfibf6syahfjgs0g0qrbds3k2gky77chfcw2615sq3aik90d"; }; } { @@ -54,13 +63,31 @@ sha256 = "194w3djc6fv1rgcjqds085b9fq074panc5vw582bcb8dbfzsrqxc"; }; } + { + goPackagePath = "github.com/gosexy/gettext"; + fetch = { + type = "git"; + url = "https://github.com/gosexy/gettext"; + rev = "74466a0a0c4a62fea38f44aa161d4bbfbe79dd6b"; + sha256 = "0asphx8nd7zmp88wk6aakk5292np7yw73akvfdvlvs9q5r5ahkgi"; + }; + } { goPackagePath = "github.com/linuxdeepin/go-x11-client"; fetch = { type = "git"; url = "https://github.com/linuxdeepin/go-x11-client"; - rev = "b5b01565d224d5ccd5a4143d9099acceb23e182a"; - sha256 = "1lnffjp8bqy6f8caw6drg1js6hny5w7432riqchcrcd4q85d94rs"; + rev = "2874f2925c6becbced5cd9907cdcea11995a5689"; + sha256 = "1m2ddigbmfi6wrwgkzl62dqrpp9iz1pawbww47cljiyp0gn4m73k"; + }; + } + { + goPackagePath = "github.com/mattn/go-sqlite3"; + fetch = { + type = "git"; + url = "https://github.com/mattn/go-sqlite3"; + rev = "2329c6ea75848eeef874a9823d87f406047b64fe"; + sha256 = "1nma9dfyp8hljh9ip9iz0d5a6syhb55aqdg252w0wy9shkdbani8"; }; } { @@ -72,13 +99,31 @@ sha256 = "005cpiwq28krbjf0zjwpfh63rp4s4is58700idn24fs3g7wdbwya"; }; } + { + goPackagePath = "github.com/rickb777/date"; + fetch = { + type = "git"; + url = "https://github.com/rickb777/date"; + rev = "91ffaa5317ed63daf80bc6a7be42187ba1fee8b6"; + sha256 = "1m3ipmiz6hjv9qppmzgxjcrg5dvz6n647sl7kzji61278r7a1yzb"; + }; + } + { + goPackagePath = "github.com/rickb777/plural"; + fetch = { + type = "git"; + url = "https://github.com/rickb777/plural"; + rev = "44251da1de76daab9ce0d4f0d2652e170daa5558"; + sha256 = "1phkmwfqx1dyqzyi8gxczlb6rkk2h85crvmkrxh5cl268hma9wir"; + }; + } { goPackagePath = "golang.org/x/image"; fetch = { type = "git"; url = "https://go.googlesource.com/image"; - rev = "e7c1f5e7dbb87d8921928a6d9fc52fb31ce73b24"; - sha256 = "0czp897aicqw1dgybj0hc2zzwb20rhqkdqm7siqci3yk7yk9cymf"; + rev = "972c09e46d762a13c1a3c48b1fa9b87e2c537805"; + sha256 = "0r42mzrsgdhr64pv7zxnniaj8alpdraphcrp0l6qbs60l6gahjph"; }; } { @@ -86,8 +131,8 @@ fetch = { type = "git"; url = "https://go.googlesource.com/net"; - rev = "daa7c04131f568e31c51927b359a2d197a357058"; - sha256 = "17gbfvb5iqyayzw0zd6q218zsbf7x74rflvn18wkxvsw95n1y54h"; + rev = "3edf25e44fccea9e11b919341e952fca722ef460"; + sha256 = "01iyxw6r5gb5lgdzs5sdkw4p31rjf2b14vvy45gryhjrcbg13r1a"; }; } { diff --git a/pkgs/desktops/deepin/dde-calendar/default.nix b/pkgs/desktops/deepin/dde-calendar/default.nix index 094f3447c6b77..5f0b66197efdd 100644 --- a/pkgs/desktops/deepin/dde-calendar/default.nix +++ b/pkgs/desktops/deepin/dde-calendar/default.nix @@ -1,48 +1,73 @@ { stdenv , mkDerivation , fetchFromGitHub -, pkgconfig , cmake -, qttools -, deepin-gettext-tools -, dtkcore +, dbus +, dde-qt-dbus-factory +, deepin-shortcut-viewer , dtkwidget +, pkg-config +, qttools , deepin +, wrapGAppsHook }: mkDerivation rec { pname = "dde-calendar"; - version = "5.0.1"; + version = "5.7.0.5"; src = fetchFromGitHub { owner = "linuxdeepin"; repo = pname; rev = version; - sha256 = "1zzr3crkz4l5l135y0m53vqhv7fkrbvbspk8295swz9gsm3f7ah9"; + sha256 = "1f7n1w6czpp8v9nipbvaslz6qzmhwk9hkqsda24wppkh2x1n0j55"; }; nativeBuildInputs = [ cmake - pkgconfig + pkg-config qttools - deepin-gettext-tools deepin.setupHook + wrapGAppsHook ]; buildInputs = [ - dtkcore + dbus + dde-qt-dbus-factory + deepin-shortcut-viewer dtkwidget ]; postPatch = '' searchHardCodedPaths - patchShebangs translate_generation.sh - patchShebangs translate_desktop.sh + fixPath $out /usr CMakeLists.txt + fixPath $out /usr/bin/dde-calendar assets/dbus/com.deepin.Calendar.service + substituteInPlace assets/dde-calendar.desktop --replace Exec=dde-calendar Exec=$out/bin/dde-calendar + substituteInPlace src/calendarmainwindow.cpp --replace \"deepin-shortcut-viewer\" \"${deepin-shortcut-viewer}/bin/deepin-shortcut-viewer\" + substituteInPlace src/main.cpp --replace dbus-send ${dbus}/bin/dbus-send + + + # Fixes from archlinux + + sed -i '//a #include ' src/daymonthview.cpp + sed -i '//a #include ' src/schcedulesearchview.cpp + sed -i '/include /a #include ' src/draginfographicsview.cpp - fixPath $out /usr com.deepin.Calendar.service + # Not included in https://github.com/linuxdeepin/dde-calendar/pull/30 yet + sed -i '/include /a #include ' src/schcedulesearchview.cpp src/daymonthview.cpp src/weekheadview.cpp src/customframe.cpp + sed -i '/include /a #include ' src/yearwindow.cpp + ''; + + dontWrapQtApps = true; + + preFixup = '' + gappsWrapperArgs+=( + "''${qtWrapperArgs[@]}" + ) + ''; - sed -i translate_desktop.sh \ - -e "s,/usr/bin/deepin-desktop-ts-convert,deepin-desktop-ts-convert," + postFixup = '' + searchHardCodedPaths $out ''; passthru.updateScript = deepin.updateScript { inherit pname version src; }; diff --git a/pkgs/desktops/deepin/dde-control-center/default.nix b/pkgs/desktops/deepin/dde-control-center/default.nix index 850e39b93676c..e3e02e3ee5674 100644 --- a/pkgs/desktops/deepin/dde-control-center/default.nix +++ b/pkgs/desktops/deepin/dde-control-center/default.nix @@ -1,7 +1,8 @@ { stdenv , mkDerivation , fetchFromGitHub -, pkgconfig +, fetchpatch +, pkg-config , cmake , deepin , qttools @@ -9,7 +10,6 @@ , networkmanager , qtsvg , qtx11extras -, dtkcore , dtkwidget , geoip , gsettings-qt @@ -24,34 +24,34 @@ , qt5integration , deepin-desktop-base , deepin-desktop-schemas -, dbus , systemd , dde-qt-dbus-factory , qtmultimedia , qtbase , glib , gnome3 -, which , substituteAll , tzdata +, udisks2-qt5 +, libpwquality , wrapGAppsHook }: mkDerivation rec { pname = "dde-control-center"; - version = "5.0.0"; + version = "5.3.0.9"; src = fetchFromGitHub { owner = "linuxdeepin"; repo = pname; rev = version; - sha256 = "10bx8bpvi3ib32a3l4nyb1j0iq3bch8jm9wfm6d5v0ym1zb92x3b"; + sha256 = "19ahksgs4zjqg1g51rpfl8d9y27pdvjmwwbq4z9g7h3f3jl959c8"; }; nativeBuildInputs = [ cmake deepin.setupHook - pkgconfig + pkg-config wrapGAppsHook ]; @@ -62,7 +62,6 @@ mkDerivation rec { dde-qt-dbus-factory deepin-desktop-base deepin-desktop-schemas - dtkcore dtkwidget fontconfig freetype @@ -73,6 +72,7 @@ mkDerivation rec { gnome3.networkmanager-openvpn gnome3.networkmanager-vpnc gsettings-qt + libpwquality mtdev networkmanager-qt qt5integration @@ -82,6 +82,7 @@ mkDerivation rec { qtsvg qttools qtx11extras + udisks2-qt5 xorg.libX11 xorg.libXext xorg.libXrandr @@ -94,10 +95,18 @@ mkDerivation rec { ]; patches = [ + (fetchpatch { + url = "https://raw.githubusercontent.com/archlinux/svntogit-community/packages/deepin-control-center/trunk/deepin-control-center-no-user-experience.patch"; + sha256 = "0n4kzk7vc5hai4fi9wga64756y4zms9hy504bddasvqsg8sw0mw7"; + }) + # (fetchpatch { + # name = "deepin-control-center-build-fix.patch"; + # url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/deepin-control-center-build-fix.patch?h=packages/deepin-control-center"; + # sha256 = "09k0vlwwg9zsqhp1y0miagch39hf8s0r2yi98p11gjydkh8nm1cz"; + # }) (substituteAll { src = ./fix-paths.patch; nmcli = "${networkmanager}/bin/nmcli"; - which = "${which}/bin/which"; # not packaged # dman = "${deepin-manual}/bin/dman"; inherit tzdata; @@ -114,14 +123,40 @@ mkDerivation rec { patchShebangs translate_generation.sh patchShebangs translate_desktop2ts.sh - fixPath $out /usr dde-control-center-autostart.desktop \ + fixPath $out /usr \ + abrecovery/deepin-ab-recovery.desktop \ com.deepin.dde.ControlCenter.service \ - src/frame/widgets/utils.h + dde-control-center-autostart.desktop \ + include/widgets/utils.h \ + src/frame/window/mainwindow.cpp + + fixPath ${tzdata} /usr/share/zoneinfo \ + src/frame/modules/datetime/timezone_dialog/timezone.cpp + + fixPath ${dde-network-utils} /usr/share/dde-network-utils \ + src/frame/main.cpp + + fixPath $out /usr/share/dde-control-center/translations \ + abrecovery/main.cpp \ + src/dialogs/main.cpp + + substituteInPlace abrecovery/CMakeLists.txt \ + --replace "DESTINATION /usr/bin" "DESTINATION $out/bin" \ + --replace "DESTINATION /etc/xdg" "DESTINATION $out/etc/xdg" - substituteInPlace dde-control-center.desktop \ - --replace "dbus-send" "${dbus}/bin/dbus-send" substituteInPlace com.deepin.controlcenter.addomain.policy \ --replace "/bin/systemctl" "/run/current-system/sw/bin/systemctl" + + substituteInPlace dde-control-center.desktop \ + --replace Exec=dde-control-center Exec=$out/bin/dde-control-center + + # remove after they obey -DDISABLE_SYS_UPDATE properly + sed -i '/new UpdateModule/d' src/frame/window/mainwindow.cpp + ''; + + postInstall = '' + rm $out/etc/xdg/autostart/deepin-ab-recovery.desktop + rmdir $out/etc/xdg/autostart $out/etc/xdg $out/etc ''; dontWrapQtApps = true; diff --git a/pkgs/desktops/deepin/dde-control-center/fix-paths.patch b/pkgs/desktops/deepin/dde-control-center/fix-paths.patch index 2c6e204d34379..54e42a890233c 100644 --- a/pkgs/desktops/deepin/dde-control-center/fix-paths.patch +++ b/pkgs/desktops/deepin/dde-control-center/fix-paths.patch @@ -1,5 +1,17 @@ +From d6e868b933b63fc047b541c0ab69e0df02a7bfed Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= +Date: Fri, 12 Jun 2020 11:55:35 -0300 +Subject: [PATCH] fix build paths + +--- + src/frame/frame.cpp | 2 +- + src/frame/modules/datetime/timezone_dialog/timezone.cpp | 2 +- + src/frame/window/modules/network/connectionvpneditpage.cpp | 2 +- + src/frame/window/modules/network/vpnpage.cpp | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + diff --git a/src/frame/frame.cpp b/src/frame/frame.cpp -index 90d06f8..7cdad04 100644 +index 90d06f82a..7cdad0453 100644 --- a/src/frame/frame.cpp +++ b/src/frame/frame.cpp @@ -375,7 +375,7 @@ void Frame::keyPressEvent(QKeyEvent *e) @@ -12,7 +24,7 @@ index 90d06f8..7cdad04 100644 } } diff --git a/src/frame/modules/datetime/timezone_dialog/timezone.cpp b/src/frame/modules/datetime/timezone_dialog/timezone.cpp -index 3dd4aad..5f1b363 100644 +index 3dd4aade5..5f1b363da 100644 --- a/src/frame/modules/datetime/timezone_dialog/timezone.cpp +++ b/src/frame/modules/datetime/timezone_dialog/timezone.cpp @@ -46,7 +46,7 @@ namespace installer { @@ -24,11 +36,11 @@ index 3dd4aad..5f1b363 100644 // Absolute path to backward timezone file. const char kTimezoneAliasFile[] = "/timezone_alias"; -diff --git a/src/frame/modules/network/connectionvpneditpage.cpp b/src/frame/modules/network/connectionvpneditpage.cpp -index e292865..95c5a2b 100644 ---- a/src/frame/modules/network/connectionvpneditpage.cpp -+++ b/src/frame/modules/network/connectionvpneditpage.cpp -@@ -215,7 +215,7 @@ void ConnectionVpnEditPage::exportConnConfig() +diff --git a/src/frame/window/modules/network/connectionvpneditpage.cpp b/src/frame/window/modules/network/connectionvpneditpage.cpp +index 6a287d629..7c0e45723 100644 +--- a/src/frame/window/modules/network/connectionvpneditpage.cpp ++++ b/src/frame/window/modules/network/connectionvpneditpage.cpp +@@ -247,7 +247,7 @@ void ConnectionVpnEditPage::exportConnConfig() qDebug() << Q_FUNC_INFO << args; QProcess p; @@ -37,11 +49,11 @@ index e292865..95c5a2b 100644 p.waitForFinished(); qDebug() << p.readAllStandardOutput(); qDebug() << p.readAllStandardError(); -diff --git a/src/frame/modules/network/vpnpage.cpp b/src/frame/modules/network/vpnpage.cpp -index 521a603..450d1a6 100644 ---- a/src/frame/modules/network/vpnpage.cpp -+++ b/src/frame/modules/network/vpnpage.cpp -@@ -224,7 +224,7 @@ void VpnPage::importVPN() +diff --git a/src/frame/window/modules/network/vpnpage.cpp b/src/frame/window/modules/network/vpnpage.cpp +index 1769e50dd..3aa3ccd16 100644 +--- a/src/frame/window/modules/network/vpnpage.cpp ++++ b/src/frame/window/modules/network/vpnpage.cpp +@@ -336,7 +336,7 @@ void VpnPage::importVPN() qDebug() << args; QProcess p; @@ -50,16 +62,6 @@ index 521a603..450d1a6 100644 p.waitForFinished(); const auto stat = p.exitCode(); const QString output = p.readAllStandardOutput(); -diff --git a/src/frame/modules/sync/syncworker.cpp b/src/frame/modules/sync/syncworker.cpp -index 3f929bf..6f240d9 100644 ---- a/src/frame/modules/sync/syncworker.cpp -+++ b/src/frame/modules/sync/syncworker.cpp -@@ -24,7 +24,7 @@ SyncWorker::SyncWorker(SyncModel *model, QObject *parent) - - m_model->setSyncIsValid( - QProcess::execute( -- "which", QStringList() << "/usr/lib/deepin-sync-daemon/deepin-sync-daemon") == -+ "@which@", QStringList() << "@deepin_sync@/lib/deepin-sync-daemon/deepin-sync-daemon") == - 0 && - valueByQSettings(DCC_CONFIG_FILES, "CloudSync", "AllowCloudSync", false)); - } +-- +2.26.2 + diff --git a/pkgs/desktops/deepin/dde-daemon/default.nix b/pkgs/desktops/deepin/dde-daemon/default.nix index c4edcef15af3f..a1ac9a12db08c 100644 --- a/pkgs/desktops/deepin/dde-daemon/default.nix +++ b/pkgs/desktops/deepin/dde-daemon/default.nix @@ -2,40 +2,45 @@ , buildGoPackage , fetchFromGitHub , fetchpatch -, pkgconfig -, go-dbus-factory -, go-gir-generator -, go-lib -, deepin-gettext-tools -, gettext +, alsaLib +, dbus +, ddcutil , dde-api +, deepin +, deepin-desktop-base , deepin-desktop-schemas +, deepin-gettext-tools , deepin-wallpapers -, deepin-desktop-base -, alsaLib +, gdk-pixbuf-xlib +, gettext , glib +, glibc +, go +, go-dbus-factory +, go-gir-generator +, go-lib +, gobject-introspection , gtk3 +, hicolor-icon-theme , libgudev , libinput , libnl , librsvg , linux-pam +, lshw +, makeWrapper , networkmanager +, pkg-config , pulseaudio -, python3 -, hicolor-icon-theme -, glibc +, python3Packages , tzdata -, go -, deepin -, makeWrapper -, xkeyboard_config , wrapGAppsHook +, xkeyboard_config }: buildGoPackage rec { pname = "dde-daemon"; - version = "5.0.0"; + version = "5.11.0.33"; goPackagePath = "pkg.deepin.io/dde/daemon"; @@ -43,49 +48,55 @@ buildGoPackage rec { owner = "linuxdeepin"; repo = pname; rev = version; - sha256 = "08jri31bvzbaxaq78rpp46ndv0li2dij63hakvd9b9gs786srql1"; + sha256 = "0n4gmslyi3sfwa79h3zxlnnwmn84cnmjx8w9j0rvysir45fv3g76"; }; patches = [ # https://github.com/linuxdeepin/dde-daemon/issues/51 (fetchpatch { - url = "https://github.com/jouyouyun/tap-gesture-patches/raw/master/patches/dde-daemon_3.8.0.patch"; - sha256 = "1ampdsp9zlg263flswdw9gj10n7gxh7zi6w6z9jgh29xlai05pvh"; + name = "dde-daemon_5.9.4.2.diff"; + url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/dde-daemon_5.9.4.2.diff?h=packages/deepin-daemon"; + sha256 = "1ld2mb6nxwh4f41fdvlfa6pdb9sg8zcw9z4m03iqp6lrxg152gjg"; }) ]; goDeps = ./deps.nix; nativeBuildInputs = [ - pkgconfig deepin-gettext-tools + deepin.setupHook gettext + gobject-introspection + makeWrapper networkmanager networkmanager.dev - python3 - makeWrapper + pkg-config + python3Packages.pygobject3 + python3Packages.python wrapGAppsHook - deepin.setupHook ]; buildInputs = [ - go-dbus-factory - go-gir-generator - go-lib - linux-pam - alsaLib + dbus + ddcutil dde-api deepin-desktop-base deepin-desktop-schemas deepin-wallpapers + gdk-pixbuf-xlib glib - libgudev + go-dbus-factory + go-gir-generator + go-lib gtk3 hicolor-icon-theme + libgudev libinput libnl librsvg + linux-pam + lshw pulseaudio tzdata xkeyboard_config @@ -93,17 +104,28 @@ buildGoPackage rec { postPatch = '' searchHardCodedPaths # debugging + patchShebangs network/nm_generator/gen_nm_consts.py fixPath $out /usr/share/dde/data launcher/manager.go dock/dock_manager_init.go fixPath $out /usr/share/dde-daemon launcher/manager.go gesture/config.go fixPath ${networkmanager.dev} /usr/share/gir-1.0/NM-1.0.gir network/nm_generator/Makefile fixPath ${glibc.bin} /usr/bin/getconf systeminfo/utils.go - fixPath ${deepin-desktop-base} /etc/deepin-version systeminfo/version.go accounts/deepinversion.go + fixPath ${deepin-desktop-base} /etc/deepin-version systeminfo/version.go + fixPath ${deepin-desktop-base} /etc/deepin-version accounts/deepinversion.go fixPath ${tzdata} /usr/share/zoneinfo timedate/zoneinfo/zone.go fixPath ${dde-api} /usr/lib/deepin-api grub2/modify_manger.go accounts/image_blur.go fixPath ${deepin-wallpapers} /usr/share/wallpapers appearance/background/list.go accounts/user.go fixPath ${xkeyboard_config} /usr/share/X11/xkb inputdevices/layout_list.go + fixPath ${dbus} /usr/bin/dbus-send misc/udev-rules/80-deepin-fprintd.rules + + substituteInPlace system/systeminfo/manager.go --replace \"lshw\" \"${lshw}/bin/lshw\" + + # TODO: kwin_no_scale is provided by dde-kwin, but adding it as a + # dependence causes mutual recursion. For now assumes it can be + # founded in $PATH: + + substituteInPlace keybinding/utils.go --replace /usr/bin/kwin_no_scale kwin_no_scale # TODO: deepin-system-monitor comes from dde-extra @@ -126,22 +148,29 @@ buildGoPackage rec { ''; buildPhase = '' - export PAM_MODULE_DIR="$out/lib/security" - # compilation of the nm module is failing - #make -C go/src/${goPackagePath}/network/nm_generator gen-nm-code + GOPATH="$GOPATH:${go-dbus-factory}/share/go" + GOPATH="$GOPATH:${go-gir-generator}/share/go" + GOPATH="$GOPATH:${go-lib}/share/go" + GOPATH="$GOPATH:${dde-api}/share/go" + + make gen-nm-code \ + PYTHONPATH=${python3Packages.pygobject3}/${python3Packages.python.sitePackages}:$PYTHONPATH \ + -C go/src/${goPackagePath}/network/nm_generator + make -C go/src/${goPackagePath} ''; installPhase = '' - make install PREFIX="$out" -C go/src/${goPackagePath} + make install PREFIX="$out" PAM_MODULE_DIR="$out/lib/security" -C go/src/${goPackagePath} remove-references-to -t ${go} $out/lib/deepin-daemon/* - searchHardCodedPaths $out ''; postFixup = '' # wrapGAppsHook does not work with binaries outside of $out/bin or $out/libexec for binary in $out/lib/deepin-daemon/*; do - wrapGApp "$binary" + if [ -x $binary -a ! -d $binary ]; then + wrapGApp "$binary" + fi done searchHardCodedPaths $out # debugging diff --git a/pkgs/desktops/deepin/dde-daemon/deps.nix b/pkgs/desktops/deepin/dde-daemon/deps.nix index bcc5ab81808f4..36f4cd14b8cbe 100644 --- a/pkgs/desktops/deepin/dde-daemon/deps.nix +++ b/pkgs/desktops/deepin/dde-daemon/deps.nix @@ -36,6 +36,15 @@ sha256 = "18nyqv0ic35fs9fny8sj84c00vbxs8mnric6vr6yl42624fh5id6"; }; } + { + goPackagePath = "github.com/davecgh/go-spew"; + fetch = { + type = "git"; + url = "https://github.com/davecgh/go-spew"; + rev = "d8f796af33cc11cb798c1aaeb27a4ebc5099927d"; + sha256 = "19z27f306fpsrjdvkzd61w1bdazcdbczjyjck177g33iklinhpvx"; + }; + } { goPackagePath = "github.com/gosexy/gettext"; fetch = { @@ -45,13 +54,58 @@ sha256 = "0asphx8nd7zmp88wk6aakk5292np7yw73akvfdvlvs9q5r5ahkgi"; }; } + { + goPackagePath = "github.com/jinzhu/gorm"; + fetch = { + type = "git"; + url = "https://github.com/jinzhu/gorm"; + rev = "6f4358eeb5e3df768c182ae54d90ceacff0880a8"; + sha256 = "1nnbxs337238gx0d9rg643m5jwpz005ki91g5did7rwvk7bbsly9"; + }; + } + { + goPackagePath = "github.com/jinzhu/inflection"; + fetch = { + type = "git"; + url = "https://github.com/jinzhu/inflection"; + rev = "970f05d9c0e1f5c179cedc3a0ad94010958733ab"; + sha256 = "15flpp2llgfxj52pl7zwv88pbb8h4k6dskvx7bckpijhyasrdlbv"; + }; + } + { + goPackagePath = "github.com/kelvins/sunrisesunset"; + fetch = { + type = "git"; + url = "https://github.com/kelvins/sunrisesunset"; + rev = "14f1915ad4b4fc68cdf3c144e39293993e21c67c"; + sha256 = "16w0hddnbmhdcdi9l4mc6q692ywvmpw749r9c2308rz8638wkdxx"; + }; + } { goPackagePath = "github.com/linuxdeepin/go-x11-client"; fetch = { type = "git"; url = "https://github.com/linuxdeepin/go-x11-client"; - rev = "b5b01565d224d5ccd5a4143d9099acceb23e182a"; - sha256 = "1lnffjp8bqy6f8caw6drg1js6hny5w7432riqchcrcd4q85d94rs"; + rev = "ace666086b736674685a56d457a1426eecf16782"; + sha256 = "1mnsgshg9y7c8qsqkhqassxf6j8xd1xp4frh92ihbqmsk7c4v1j2"; + }; + } + { + goPackagePath = "github.com/mattn/go-sqlite3"; + fetch = { + type = "git"; + url = "https://github.com/mattn/go-sqlite3"; + rev = "4c2df3cc4614a8001c1afdebcbda0fcf6e045719"; + sha256 = "0zvrv64v8fifnfprvz2bqc6ws897crzwfxkv8m6sk8nhi4ldy1in"; + }; + } + { + goPackagePath = "github.com/mozillazg/go-pinyin"; + fetch = { + type = "git"; + url = "https://github.com/mozillazg/go-pinyin"; + rev = "9c8aa843ac77cadf021a7425bfeb838285f9164c"; + sha256 = "0fwf16c7in644ymi6bn8j5snzsxrym3si1kqi46bsvk3bljagq7c"; }; } { @@ -59,8 +113,8 @@ fetch = { type = "git"; url = "https://github.com/msteinert/pam"; - rev = "f29b9f28d6f9a1f6c4e6fd5db731999eb946574b"; - sha256 = "1v5z51mgyz2glm7v0mg60xs1as88wx6cqhys2khc5d3khkr8q0qp"; + rev = "913b8f8cdf8bd820401708cf4f5e50d423009577"; + sha256 = "14dyzanf517dplpy7di9qd1d2n176ff369rhz4sgqzgs45cmrmhi"; }; } { @@ -72,13 +126,40 @@ sha256 = "005cpiwq28krbjf0zjwpfh63rp4s4is58700idn24fs3g7wdbwya"; }; } + { + goPackagePath = "github.com/rickb777/date"; + fetch = { + type = "git"; + url = "https://github.com/rickb777/date"; + rev = "6b66972b7ef2cb8830df566a59944ab2c5231819"; + sha256 = "1nyh9ysp6pscypf2yifw1621vz2n1xn46yr25m2bmiyhrz495xal"; + }; + } + { + goPackagePath = "github.com/rickb777/plural"; + fetch = { + type = "git"; + url = "https://github.com/rickb777/plural"; + rev = "44251da1de76daab9ce0d4f0d2652e170daa5558"; + sha256 = "1phkmwfqx1dyqzyi8gxczlb6rkk2h85crvmkrxh5cl268hma9wir"; + }; + } + { + goPackagePath = "github.com/teambition/rrule-go"; + fetch = { + type = "git"; + url = "https://github.com/teambition/rrule-go"; + rev = "5a7db71efe3ace8cf0dbdc225e590a716d027087"; + sha256 = "0aj1a01czswh5w331064fgvx2dr0g7kzgwa6vk6qjfsbxpvl47qc"; + }; + } { goPackagePath = "golang.org/x/image"; fetch = { type = "git"; url = "https://go.googlesource.com/image"; - rev = "e7c1f5e7dbb87d8921928a6d9fc52fb31ce73b24"; - sha256 = "0czp897aicqw1dgybj0hc2zzwb20rhqkdqm7siqci3yk7yk9cymf"; + rev = "972c09e46d762a13c1a3c48b1fa9b87e2c537805"; + sha256 = "0r42mzrsgdhr64pv7zxnniaj8alpdraphcrp0l6qbs60l6gahjph"; }; } { @@ -86,8 +167,8 @@ fetch = { type = "git"; url = "https://go.googlesource.com/net"; - rev = "daa7c04131f568e31c51927b359a2d197a357058"; - sha256 = "17gbfvb5iqyayzw0zd6q218zsbf7x74rflvn18wkxvsw95n1y54h"; + rev = "3edf25e44fccea9e11b919341e952fca722ef460"; + sha256 = "01iyxw6r5gb5lgdzs5sdkw4p31rjf2b14vvy45gryhjrcbg13r1a"; }; } { @@ -95,8 +176,17 @@ fetch = { type = "git"; url = "https://go.googlesource.com/text"; - rev = "4b67af870c6ffd08258ef1202f371aebccaf7b68"; - sha256 = "01mhy1xs2dh18kp6wdk1xnb34lbzv2qkvdwj7w5ha2qgm5rrm4ik"; + rev = "23ae387dee1f90d29a23c0e87ee0b46038fbed0e"; + sha256 = "19pihqm3phyndmiw6i42pdv6z1rbvlqlsnhsyqf9gsnn0qnmqqlh"; + }; + } + { + goPackagePath = "golang.org/x/xerrors"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/xerrors"; + rev = "5ec99f83aff198f5fbd629d6c8d8eb38a04218ca"; + sha256 = "1dbzc3gmf2haazpv7cgmv97rq40g2xzwbglc17vas8dwhgwgwrzb"; }; } { @@ -108,4 +198,13 @@ sha256 = "0mndnv3hdngr3bxp7yxfd47cas4prv98sqw534mx7vp38gd88n5r"; }; } + { + goPackagePath = "gopkg.in/yaml.v2"; + fetch = { + type = "git"; + url = "https://gopkg.in/yaml.v2"; + rev = "0b1645d91e851e735d3e23330303ce81f70adbe3"; + sha256 = "1md0hlyd9s6myv3663i9l59y74n4xjazifmmyxn43g86fgkc5lzj"; + }; + } ] diff --git a/pkgs/desktops/deepin/dde-dock/default.nix b/pkgs/desktops/deepin/dde-dock/default.nix index 68f2caa63191f..d1ca13c544e7e 100644 --- a/pkgs/desktops/deepin/dde-dock/default.nix +++ b/pkgs/desktops/deepin/dde-dock/default.nix @@ -2,43 +2,44 @@ , mkDerivation , fetchFromGitHub , cmake -, pkgconfig -, qttools -, qtx11extras -, qtsvg -, polkit -, gsettings-qt -, dtkcore -, dtkwidget -, dde-qt-dbus-factory -, dde-network-utils +, pkg-config , dde-daemon +, dde-network-utils +, dde-qt-dbus-factory +, deepin , deepin-desktop-schemas -, xorg +, dtkcore +, dtkgui +, dtkwidget , glib -, wrapGAppsHook -, deepin +, gsettings-qt +, libdbusmenu +, makeWrapper , plugins ? [ ] +, polkit +, qtsvg +, qttools +, qtx11extras , symlinkJoin -, makeWrapper -, libdbusmenu +, wrapGAppsHook +, xorg }: let unwrapped = mkDerivation rec { pname = "dde-dock"; - version = "5.0.0"; + version = "5.1.0.11"; src = fetchFromGitHub { owner = "linuxdeepin"; repo = pname; rev = version; - sha256 = "12dshsqhzajnxm7r53qg0c84b6xlj313qnssnx2m25z4jdp5i7pr"; + sha256 = "0ksrilmjypm5b069ra51i0dwr818h6ddsnhp9h5h47mpwg74kx7c"; }; nativeBuildInputs = [ cmake - pkgconfig + pkg-config qttools wrapGAppsHook deepin.setupHook @@ -50,6 +51,7 @@ let dde-qt-dbus-factory deepin-desktop-schemas dtkcore + dtkgui dtkwidget glib gsettings-qt @@ -57,9 +59,7 @@ let polkit qtsvg qtx11extras - xorg.libXdmcp xorg.libXtst - xorg.libpthreadstubs ]; patches = [ @@ -74,7 +74,8 @@ let fixPath $out /usr dde-dock.pc fixPath $out /usr/bin/dde-dock frame/com.deepin.dde.Dock.service fixPath $out /usr/share/dbus-1 CMakeLists.txt - fixPath ${dde-daemon} /usr/lib/deepin-daemon frame/item/showdesktopitem.cpp + fixPath ${dde-daemon} /usr/lib/deepin-daemon plugins/show-desktop/showdesktopplugin.cpp + fixPath ${dde-daemon} /usr/lib/deepin-daemon frame/panel/mainpanelcontrol.cpp fixPath ${dde-network-utils} /usr/share/dde-network-utils frame/main.cpp fixPath ${polkit} /usr/bin/pkexec plugins/overlay-warning/overlay-warning-plugin.cpp @@ -87,6 +88,8 @@ let dontWrapQtApps = true; preFixup = '' + glib-compile-schemas ${glib.makeSchemaPath "$out" "${pname}-${version}"} + gappsWrapperArgs+=( "''${qtWrapperArgs[@]}" ) diff --git a/pkgs/desktops/deepin/dde-file-manager/dde-file-manager.fix-mime-cache-paths.patch b/pkgs/desktops/deepin/dde-file-manager/dde-file-manager.fix-mime-cache-paths.patch index 253a67b04ec7b..7e414ae6553ce 100644 --- a/pkgs/desktops/deepin/dde-file-manager/dde-file-manager.fix-mime-cache-paths.patch +++ b/pkgs/desktops/deepin/dde-file-manager/dde-file-manager.fix-mime-cache-paths.patch @@ -1,7 +1,7 @@ -From 29f4ad88e2294ae70b10180e7361d135c4e5c896 Mon Sep 17 00:00:00 2001 +From 5b46017fbca78f8229f0426fecb57b5620c80028 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= Date: Mon, 13 May 2019 00:09:42 -0300 -Subject: [PATCH 2/2] Use XDG to look for mime cache +Subject: [PATCH 2/4] Use XDG to look for mime cache --- .../shutil/mimesappsmanager.cpp | 230 ++++++++++-------- @@ -9,10 +9,10 @@ Subject: [PATCH 2/2] Use XDG to look for mime cache 2 files changed, 125 insertions(+), 111 deletions(-) diff --git a/dde-file-manager-lib/shutil/mimesappsmanager.cpp b/dde-file-manager-lib/shutil/mimesappsmanager.cpp -index c9e53630..7a21df51 100644 +index ce14ecc1..e9796631 100644 --- a/dde-file-manager-lib/shutil/mimesappsmanager.cpp +++ b/dde-file-manager-lib/shutil/mimesappsmanager.cpp -@@ -552,14 +552,20 @@ QString MimesAppsManager::getMimeAppsCacheFile() +@@ -558,14 +558,20 @@ QString MimesAppsManager::getMimeAppsCacheFile() return QString("%1/%2").arg(DFMStandardPaths::location(DFMStandardPaths::CachePath), "MimeApps.json"); } @@ -37,7 +37,7 @@ index c9e53630..7a21df51 100644 } QString MimesAppsManager::getDesktopFilesCacheFile() -@@ -574,23 +580,27 @@ QString MimesAppsManager::getDesktopIconsCacheFile() +@@ -580,23 +586,27 @@ QString MimesAppsManager::getDesktopIconsCacheFile() QStringList MimesAppsManager::getDesktopFiles() { @@ -78,7 +78,7 @@ index c9e53630..7a21df51 100644 } QMap MimesAppsManager::getDesktopObjs() -@@ -663,124 +673,128 @@ void MimesAppsManager::initMimeTypeApps() +@@ -669,124 +679,128 @@ void MimesAppsManager::initMimeTypeApps() MimeApps.insert(key, orderApps); } @@ -319,5 +319,5 @@ index 223c80aa..00a61302 100644 static void initMimeTypeApps(); static void loadDDEMimeTypes(); -- -2.21.0 +2.26.2 diff --git a/pkgs/desktops/deepin/dde-file-manager/dde-file-manager.fix-paths.patch b/pkgs/desktops/deepin/dde-file-manager/dde-file-manager.fix-paths.patch index 3ced15e7e5a44..003f78810bb4b 100644 --- a/pkgs/desktops/deepin/dde-file-manager/dde-file-manager.fix-paths.patch +++ b/pkgs/desktops/deepin/dde-file-manager/dde-file-manager.fix-paths.patch @@ -1,19 +1,19 @@ -From e68d983a6befd223087916cb3fe31baee77decc4 Mon Sep 17 00:00:00 2001 +From 3491f34683461734f562610ffd3573e1802004b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= Date: Sun, 12 May 2019 08:50:07 -0300 -Subject: [PATCH 1/2] Use qt library to determine where to look for application +Subject: [PATCH 1/4] Use qt library to determine where to look for application files --- - dde-file-manager-lib/shutil/fileutils.cpp | 34 ++++++++++++------- - .../shutil/mimesappsmanager.cpp | 11 ++---- - 2 files changed, 25 insertions(+), 20 deletions(-) + dde-file-manager-lib/shutil/fileutils.cpp | 18 ++++++++++++------ + .../shutil/mimesappsmanager.cpp | 11 +++-------- + 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/dde-file-manager-lib/shutil/fileutils.cpp b/dde-file-manager-lib/shutil/fileutils.cpp -index ae8120d3..d6a0573a 100644 +index 5a5c8dd2..be6aa181 100644 --- a/dde-file-manager-lib/shutil/fileutils.cpp +++ b/dde-file-manager-lib/shutil/fileutils.cpp -@@ -242,13 +242,19 @@ bool FileUtils::isArchive(const QString &path) +@@ -243,13 +243,19 @@ bool FileUtils::isArchive(const QString &path) */ QStringList FileUtils::getApplicationNames() { QStringList appNames; @@ -38,35 +38,12 @@ index ae8120d3..d6a0573a 100644 + return appNames; } - //--------------------------------------------------------------------------- -@@ -259,12 +265,16 @@ QStringList FileUtils::getApplicationNames() { - */ - QList FileUtils::getApplications() { - QList apps; -- QDirIterator it("/usr/share/applications", QStringList("*.desktop"), -- QDir::Files | QDir::NoDotAndDotDot, -- QDirIterator::Subdirectories); -- while (it.hasNext()) { -- it.next(); -- apps.append(DesktopFile(it.filePath())); -+ const QStringList desktopDirs = QStandardPaths::standardLocations(QStandardPaths::ApplicationsLocation); -+ qDebug() << "dde-file-manager getApplications desktopDirs:" << desktopDirs; -+ for (const QString &dir : desktopDirs) { -+ QDirIterator it(dir, QStringList("*.desktop"), -+ QDir::Files | QDir::NoDotAndDotDot, -+ QDirIterator::Subdirectories); -+ while (it.hasNext()) { -+ it.next(); -+ apps.append(DesktopFile(it.filePath())); -+ } - } - return apps; - } + diff --git a/dde-file-manager-lib/shutil/mimesappsmanager.cpp b/dde-file-manager-lib/shutil/mimesappsmanager.cpp -index c6149702..c9e53630 100644 +index ed5f629d..ce14ecc1 100644 --- a/dde-file-manager-lib/shutil/mimesappsmanager.cpp +++ b/dde-file-manager-lib/shutil/mimesappsmanager.cpp -@@ -542,14 +542,9 @@ QStringList MimesAppsManager::getrecommendedAppsFromMimeWhiteList(const DUrl &ur +@@ -548,14 +548,9 @@ QStringList MimesAppsManager::getrecommendedAppsFromMimeWhiteList(const DUrl &ur QStringList MimesAppsManager::getApplicationsFolders() { @@ -85,5 +62,5 @@ index c6149702..c9e53630 100644 QString MimesAppsManager::getMimeAppsCacheFile() -- -2.21.0 +2.26.2 diff --git a/pkgs/desktops/deepin/dde-file-manager/dde-file-manager.pixmaps-paths.patch b/pkgs/desktops/deepin/dde-file-manager/dde-file-manager.pixmaps-paths.patch index 582760e6db2af..3ddab3d06376b 100644 --- a/pkgs/desktops/deepin/dde-file-manager/dde-file-manager.pixmaps-paths.patch +++ b/pkgs/desktops/deepin/dde-file-manager/dde-file-manager.pixmaps-paths.patch @@ -1,4 +1,4 @@ -From 084c3cfcf4995c109ca2e96f042fe341f925b0b4 Mon Sep 17 00:00:00 2001 +From e4d6d51646c00ef74080d2b0e7027610a34278a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= Date: Thu, 16 May 2019 19:00:52 -0300 Subject: [PATCH 4/4] Use xdg to look for pixmap icons @@ -8,10 +8,10 @@ Subject: [PATCH 4/4] Use xdg to look for pixmap icons 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/dde-file-manager-lib/shutil/fileutils.cpp b/dde-file-manager-lib/shutil/fileutils.cpp -index d6a0573a..e912e7c2 100644 +index be6aa181..ef058843 100644 --- a/dde-file-manager-lib/shutil/fileutils.cpp +++ b/dde-file-manager-lib/shutil/fileutils.cpp -@@ -362,11 +362,16 @@ QIcon FileUtils::searchAppIcon(const DesktopFile &app, +@@ -343,11 +343,16 @@ QIcon FileUtils::searchAppIcon(const DesktopFile &app, } // Last chance @@ -34,5 +34,5 @@ index d6a0573a..e912e7c2 100644 // Default icon -- -2.21.0 +2.26.2 diff --git a/pkgs/desktops/deepin/dde-file-manager/default.nix b/pkgs/desktops/deepin/dde-file-manager/default.nix index 4258e2aa859ea..75db43345f0b1 100644 --- a/pkgs/desktops/deepin/dde-file-manager/default.nix +++ b/pkgs/desktops/deepin/dde-file-manager/default.nix @@ -1,7 +1,7 @@ { stdenv , mkDerivation , fetchFromGitHub -, pkgconfig +, pkg-config , avfs , dde-daemon , dde-dock @@ -15,10 +15,10 @@ , deepin-shortcut-viewer , deepin-terminal , disomaster -, dtkcore , dtkwidget , ffmpegthumbnailer , file +, gio-qt , glib , gnugrep , gsettings-qt @@ -26,7 +26,9 @@ , jemalloc , kcodecs , libX11 +, libmediainfo, libzen , libsecret +, lxqt , polkit , polkit-qt , poppler @@ -50,20 +52,20 @@ mkDerivation rec { pname = "dde-file-manager"; - version = "5.0.0"; + version = "5.1.1.25"; src = fetchFromGitHub { owner = "linuxdeepin"; repo = pname; rev = version; - sha256 = "0n2nl09anqdq0n5yn688n385rn81lcpybs0sa8m311k3k9ndkkyr"; + sha256 = "1p79g709cicz2bjqp96qij3glhs5chgvx5ch0175r31a66bkmsg7"; }; nativeBuildInputs = [ deepin.setupHook qmake qttools - pkgconfig + pkg-config deepin-gettext-tools wrapGAppsHook ]; @@ -80,17 +82,19 @@ mkDerivation rec { deepin-shortcut-viewer deepin-terminal disomaster - dtkcore dtkwidget ffmpegthumbnailer file + gio-qt glib gnugrep gsettings-qt gvfs jemalloc kcodecs + libmediainfo libzen libsecret + lxqt.libqtxdg polkit polkit-qt poppler @@ -123,10 +127,11 @@ mkDerivation rec { patchShebangs dde-desktop/translate_generation.sh patchShebangs dde-desktop/translate_ts2desktop.sh patchShebangs dde-file-manager-lib/generate_translations.sh + patchShebangs dde-file-manager-lib/update_translations.sh + patchShebangs dde-file-manager-plugins/generate_translations.sh + patchShebangs dde-file-manager-plugins/update_translations.sh patchShebangs dde-file-manager/generate_translations.sh patchShebangs dde-file-manager/translate_ts2desktop.sh - patchShebangs usb-device-formatter/generate_translations.sh - patchShebangs usb-device-formatter/translate_ts2desktop.sh # x-terminal-emulator is a virtual package in Debian systems. The # terminal emulator is configured by Debian's alternative system. @@ -162,9 +167,7 @@ mkDerivation rec { dde-desktop/translate_desktop2ts.sh \ dde-desktop/translate_ts2desktop.sh \ dde-file-manager/translate_desktop2ts.sh \ - dde-file-manager/translate_ts2desktop.sh \ - usb-device-formatter/translate_desktop2ts.sh \ - usb-device-formatter/translate_ts2desktop.sh + dde-file-manager/translate_ts2desktop.sh fixPath ${avfs} /usr/bin/mountavfs dde-file-manager-lib/shutil/fileutils.cpp fixPath ${avfs} /usr/bin/umountavfs dde-file-manager-lib/shutil/fileutils.cpp @@ -172,13 +175,6 @@ mkDerivation rec { fixPath ${deepin-terminal} /usr/bin/deepin-terminal \ dde-file-manager-lib/shutil/fileutils.cpp - fixPath $out /usr/share/dde-file-manager \ - dde-sharefiles/appbase.pri \ - dde-sharefiles/dde-sharefiles.pro - - fixPath $out /usr/share/usb-device-formatter \ - usb-device-formatter/main.cpp - fixPath $out /usr/share/applications \ dde-file-manager/mips/dde-file-manager-autostart.desktop \ dde-desktop/development.pri @@ -193,16 +189,13 @@ mkDerivation rec { dde-file-manager-daemon/dde-file-manager-daemon.pro \ dde-file-manager-lib/dde-file-manager-lib.pro \ dde-file-manager-lib/pkexec/com.deepin.pkexec.dde-file-manager.policy \ - dde-file-manager/dde-file-manager-xdg-autostart.desktop \ dde-file-manager/dde-file-manager.desktop \ dde-file-manager/dde-file-manager.pro \ dde-file-manager/mips/dde-file-manager-autostart.desktop \ dde-file-manager/mips/dde-file-manager.desktop \ - dde-file-manager/pkexec/com.deepin.pkexec.dde-file-manager.policy \ - usb-device-formatter/pkexec/com.deepin.pkexec.usb-device-formatter.policy \ - usb-device-formatter/usb-device-formatter.desktop \ - usb-device-formatter/usb-device-formatter.pro - fixPath $out /etc \ + dde-file-manager/pkexec/com.deepin.pkexec.dde-file-manager.policy + + fixPath $out /etc \ dde-file-manager/dde-file-manager.pro \ dde-file-manager-daemon/dde-file-manager-daemon.pro @@ -213,10 +206,7 @@ mkDerivation rec { dde-desktop/development.pri \ dde-dock-plugins/disk-mount/disk-mount.pro \ dde-file-manager-daemon/dde-file-manager-daemon.pro \ - usb-device-formatter/usb-device-formatter.pro - - sed -i -e "s,xdg-user-dir,${xdg-user-dirs}/bin/xdg-user-dir," \ - dde-file-manager/dde-xdg-user-dirs-update + gschema/gschema.pro sed -i -e "s,Exec=dde-file-manager,Exec=$out/bin/dde-file-manager," \ dde-file-manager/dde-file-manager.desktop @@ -266,14 +256,11 @@ mkDerivation rec { "CONFIG+=DISABLE_FFMPEG" ]; - preBuild = '' - export LD_LIBRARY_PATH="$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${zlib}/lib"; - export LD_LIBRARY_PATH="$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${libX11}/lib"; - ''; - dontWrapQtApps = true; preFixup = '' + glib-compile-schemas ${glib.makeSchemaPath "$out" "${pname}-${version}"} + gappsWrapperArgs+=( "''${qtWrapperArgs[@]}" ) @@ -281,7 +268,6 @@ mkDerivation rec { postFixup = '' # debuging - unset LD_LIBRARY_PATH searchForUnresolvedDLL $out searchHardCodedPaths $out ''; diff --git a/pkgs/desktops/deepin/dde-kwin/default.nix b/pkgs/desktops/deepin/dde-kwin/default.nix index ce1a1a8dda036..5fd8a4e2cfe89 100644 --- a/pkgs/desktops/deepin/dde-kwin/default.nix +++ b/pkgs/desktops/deepin/dde-kwin/default.nix @@ -1,6 +1,6 @@ { stdenv , mkDerivation -, pkgconfig +, pkg-config , fetchFromGitHub , deepin , cmake @@ -11,10 +11,11 @@ , kwindowsystem , kcoreaddons , kwin -, dtkcore +, dtkgui , gsettings-qt , fontconfig , deepin-desktop-schemas +, deepin-wallpapers , glib , libXrender , mtdev @@ -26,19 +27,18 @@ , epoxy , qt5integration , dde-session-ui -, dbus , wrapGAppsHook }: mkDerivation rec { pname = "dde-kwin"; - version = "5.0.0"; + version = "5.1.0.4"; src = fetchFromGitHub { owner = "linuxdeepin"; repo = pname; rev = version; - sha256 = "0bvkx9h5ygj46a0j76kfyq3gvk6zn4fx6clhrmcr40hbi2k33cbl"; + sha256 = "0jxa2r3ksgcfkwqwks3ylc61cip8659raq3bjn4p6prvnixww9ql"; }; nativeBuildInputs = [ @@ -46,13 +46,14 @@ mkDerivation rec { deepin-gettext-tools deepin.setupHook extra-cmake-modules - pkgconfig + pkg-config wrapGAppsHook ]; buildInputs = [ deepin-desktop-schemas - dtkcore + deepin-wallpapers + dtkgui epoxy fontconfig glib @@ -97,19 +98,14 @@ mkDerivation rec { fixPath ${deepin-gettext-tools} /usr/bin/deepin-desktop-ts-convert translate_desktop2ts.sh translate_ts2desktop.sh - fixPath $out /etc/xdg configures/CMakeLists.txt deepin-wm-dbus/deepinwmfaker.cpp - - # TODO: Need environmental patch - fixPath /run/current-system/sw /usr/lib plugins/kwin-xcb/plugin/main.cpp - - substituteInPlace configures/kwin-wm-multitaskingview.desktop \ - --replace "dbus-send" "${dbus}/bin/dbus-send" + fixPath $out /etc/xdg configures/CMakeLists.txt configures/kwin_no_scale.in deepin-wm-dbus/deepinwmfaker.cpp fixPath ${dde-session-ui} /usr/lib/deepin-daemon/dde-warning-dialog deepin-wm-dbus/deepinwmfaker.cpp - # Correct qt plugin installation path to be within dde-kwin prefix. - substituteInPlace CMakeLists.txt \ - --subst-var-by plugin_path "$out/$qtPluginPrefix" + substituteInPlace plugins/kwineffects/multitasking/background.cpp --replace "/usr/share/backgrounds/default_background.jpg" "${deepin-wallpapers}/share/backgrounds/deepin/desktop.jpg" + + # Correct qt plugin installation path to be within dde-kwin prefix + substituteInPlace CMakeLists.txt --subst-var-by plugin_path "$out/$qtPluginPrefix" ''; postInstall = '' @@ -128,7 +124,9 @@ mkDerivation rec { ) ''; - enableParallelBuilding = true; + postFixup = '' + searchHardCodedPaths $out # debugging + ''; passthru.updateScript = deepin.updateScript { inherit pname version src; }; diff --git a/pkgs/desktops/deepin/dde-launcher/default.nix b/pkgs/desktops/deepin/dde-launcher/default.nix index 0a50f7177bae9..8aebe94df76f3 100644 --- a/pkgs/desktops/deepin/dde-launcher/default.nix +++ b/pkgs/desktops/deepin/dde-launcher/default.nix @@ -1,14 +1,13 @@ { stdenv , mkDerivation , fetchFromGitHub -, pkgconfig +, pkg-config , cmake , dde-qt-dbus-factory , dde-session-ui , deepin , deepin-desktop-schemas , deepin-wallpapers -, dtkcore , dtkwidget , gsettings-qt , qtsvg @@ -22,18 +21,18 @@ mkDerivation rec { pname = "dde-launcher"; - version = "5.0.0"; + version = "5.3.0.5"; src = fetchFromGitHub { owner = "linuxdeepin"; repo = pname; rev = version; - sha256 = "0zh6bb0r3pgjrnw9rba46ghdzza1ka1mv7r1znf8gw24wsjgjcpn"; + sha256 = "1szdbrkzxmq7ibmmfl75jl3b1dkysbi79hrrrkahn70ik8dj0n3p"; }; nativeBuildInputs = [ cmake - pkgconfig + pkg-config qttools wrapGAppsHook deepin.setupHook @@ -44,7 +43,6 @@ mkDerivation rec { dde-session-ui deepin-desktop-schemas deepin-wallpapers - dtkcore dtkwidget glib gsettings-qt @@ -63,7 +61,7 @@ mkDerivation rec { substituteInPlace src/dbusservices/com.deepin.dde.Launcher.service --replace "/usr" "$out" substituteInPlace src/historywidget.cpp --replace "xdg-open" "${xdg_utils}/bin/xdg-open" - substituteInPlace src/widgets/miniframebottombar.cpp --replace "dde-shutdown" "${dde-session-ui}/bin/dde-shutdown" + substituteInPlace src/widgets/miniframerightbar.cpp --replace "dde-shutdown" "${dde-session-ui}/bin/dde-shutdown" substituteInPlace src/widgets/miniframerightbar.cpp --replace "which" "${which}/bin/which" # Uncomment (and remove space after $) after packaging deepin-manual diff --git a/pkgs/desktops/deepin/dde-network-utils/default.nix b/pkgs/desktops/deepin/dde-network-utils/default.nix index d54558acf080b..3d35f47682d3b 100644 --- a/pkgs/desktops/deepin/dde-network-utils/default.nix +++ b/pkgs/desktops/deepin/dde-network-utils/default.nix @@ -3,9 +3,10 @@ , fetchFromGitHub , substituteAll , qmake -, pkgconfig +, pkg-config , qttools , dde-qt-dbus-factory +, gsettings-qt , proxychains , which , deepin @@ -13,24 +14,25 @@ mkDerivation rec { pname = "dde-network-utils"; - version = "5.0.1"; + version = "6.1.0101.1"; src = fetchFromGitHub { owner = "linuxdeepin"; repo = pname; rev = version; - sha256 = "0670kfnkplf7skkd1ql6y9x15kmrcbdv1005qwkg4vn8hic6s0z3"; + sha256 = "11vllzq0v8nns6lzi44b4318m5jwcgahhv7hfap56zjiibqyzfwm"; }; nativeBuildInputs = [ qmake - pkgconfig + pkg-config qttools deepin.setupHook ]; buildInputs = [ dde-qt-dbus-factory + gsettings-qt proxychains which ]; diff --git a/pkgs/desktops/deepin/dde-polkit-agent/default.nix b/pkgs/desktops/deepin/dde-polkit-agent/default.nix index 1ca9a80abaf1a..27ef225d3afe3 100644 --- a/pkgs/desktops/deepin/dde-polkit-agent/default.nix +++ b/pkgs/desktops/deepin/dde-polkit-agent/default.nix @@ -1,29 +1,31 @@ { stdenv , mkDerivation , fetchFromGitHub -, pkgconfig +, pkg-config , qmake -, qttools -, polkit-qt -, dtkcore -, dtkwidget , dde-qt-dbus-factory +, dtkwidget +, gsettings-qt +, polkit-qt +, qtmultimedia +, qttools +, qtx11extras , deepin }: mkDerivation rec { pname = "dde-polkit-agent"; - version = "5.0.0"; + version = "5.2.0.7"; src = fetchFromGitHub { owner = "linuxdeepin"; repo = pname; rev = version; - sha256 = "00p8syx6rfwhq7wdsk37hm9mvwd0kwj9h0s39hii892h1psd84q9"; + sha256 = "076laqrnwr87dp459xl5ji51hisv1g3j4gsvx8bd31048rx3nfbn"; }; nativeBuildInputs = [ - pkgconfig + pkg-config qmake qttools deepin.setupHook @@ -31,15 +33,20 @@ mkDerivation rec { buildInputs = [ dde-qt-dbus-factory - dtkcore dtkwidget + gsettings-qt polkit-qt + qtmultimedia + qtx11extras ]; postPatch = '' searchHardCodedPaths patchShebangs translate_generation.sh + # https://github.com/linuxdeepin/developer-center/issues/1721 + substituteInPlace policykitlistener.cpp --replace 'bool is_deepin = true' 'bool is_deepin = false' + fixPath $out /usr dde-polkit-agent.pro polkit-dde-authentication-agent-1.desktop fixPath /run/current-system/sw /usr/lib/polkit-1-dde/plugins pluginmanager.cpp ''; diff --git a/pkgs/desktops/deepin/dde-qt-dbus-factory/default.nix b/pkgs/desktops/deepin/dde-qt-dbus-factory/default.nix index c7efb0f4b044f..c7badeecba14f 100644 --- a/pkgs/desktops/deepin/dde-qt-dbus-factory/default.nix +++ b/pkgs/desktops/deepin/dde-qt-dbus-factory/default.nix @@ -7,13 +7,13 @@ stdenv.mkDerivation rec { pname = "dde-qt-dbus-factory"; - version = "5.0.1"; + version = "5.3.0.4"; src = fetchFromGitHub { owner = "linuxdeepin"; repo = pname; rev = version; - sha256 = "1wbh4jgvy3c09ivy0vvfk0azkg4d2sv37y23c9rq49jb3sakcjgm"; + sha256 = "0x45d44i08nvqps299c1hw36qv849g7nks52ggwmk3hg01p7iav2"; }; nativeBuildInputs = [ @@ -22,6 +22,10 @@ stdenv.mkDerivation rec { deepin.setupHook ]; + qmakeFlags = [ + "QMAKE_PKGCONFIG_PREFIX=${placeholder "out"}" + ]; + postPatch = '' searchHardCodedPaths fixPath $out /usr \ @@ -29,7 +33,9 @@ stdenv.mkDerivation rec { libdframeworkdbus/libdframeworkdbus.pro ''; - enableParallelBuilding = true; + postFixup = '' + searchHardCodedPaths $out + ''; passthru.updateScript = deepin.updateScript { inherit pname version src; }; diff --git a/pkgs/desktops/deepin/dde-session-shell/default.nix b/pkgs/desktops/deepin/dde-session-shell/default.nix new file mode 100644 index 0000000000000..054a87a113a6a --- /dev/null +++ b/pkgs/desktops/deepin/dde-session-shell/default.nix @@ -0,0 +1,139 @@ +{ stdenv +, mkDerivation +, fetchFromGitHub +, cmake +, pkg-config +, dde-qt-dbus-factory +, dde-session-ui +, deepin-desktop-base +, deepin-icon-theme +, deepin-wallpapers +, dtkwidget +, gsettings-qt +, libXcursor +, libXrandr +, libXtst +, lightdm +, lightdm_qt +, linux-pam +, qtbase +, qtmultimedia +, qttools +, qtx11extras +, xkeyboard_config +, deepin +}: + +mkDerivation rec { + pname = "dde-session-shell"; + version = "5.3.0.5"; + + src = fetchFromGitHub { + owner = "linuxdeepin"; + repo = pname; + rev = version; + sha256 = "1q7x3s1yfybwcp95ryxf1adn9sg6b2g19xy2935jaq78vswv4fzp"; + }; + + nativeBuildInputs = [ + cmake + pkg-config + qttools + deepin.setupHook + ]; + + buildInputs = [ + dde-qt-dbus-factory + dde-session-ui + deepin-desktop-base + deepin-wallpapers + dtkwidget + gsettings-qt + libXcursor + libXrandr + libXtst + lightdm + lightdm_qt + linux-pam + qtmultimedia + qtx11extras + xkeyboard_config + ]; + + postPatch = '' + searchHardCodedPaths # debugging + + fixPath $out /etc/deepin/greeters.d \ + CMakeLists.txt \ + files/deepin-greeter \ + src/lightdm-deepin-greeter/deepin-greeter \ + src/lightdm-deepin-greeter/lightdm-deepin-greeter.pro + + fixPath $out /usr/bin/dde-lock files/com.deepin.dde.lockFront.service + fixPath $out /usr/bin/dde-shutdown files/com.deepin.dde.shutdownFront.service + fixPath $out /usr/bin/deepin-greeter files/lightdm-deepin-greeter.desktop + fixPath $out /usr/bin/lightdm-deepin-greeter scripts/lightdm-deepin-greeter + fixPath $out /usr/lib/deepin-daemon/greeter-display-daemon scripts/lightdm-deepin-greeter + fixPath $out /usr/share/dde-session-shell src/app/dde-lock.cpp + fixPath $out /usr/share/dde-session-shell src/app/dde-shutdown.cpp + fixPath $out /usr/share/dde-session-shell src/app/lightdm-deepin-greeter.cpp + fixPath $out /usr/share/dde-session-shell src/session-widgets/lockcontent.cpp + + # This file seems not to be installed. Nonetheless... + fixPath $out /usr/share/dde-session-ui/dde-shutdown.conf src/global_util/constants.h + + ###!fixPath ${deepin-desktop-base} /etc/deepin-version src/widgets/logowidget.cpp + fixPath ${dde-session-ui} /usr/share/dde-session-ui/dde-session-ui.conf src/global_util/constants.h + fixPath ${xkeyboard_config} /usr/share/X11/xkb/rules/base.xml src/global_util/xkbparser.h + + substituteInPlace src/widgets/fullscreenbackground.cpp \ + --replace /usr/share/backgrounds/{default_background.jpg,deepin/desktop.jpg} + + fixPath ${deepin-wallpapers} /usr/share/backgrounds src/dde-shutdown/view/contentwidget.cpp + fixPath ${deepin-wallpapers} /usr/share/backgrounds src/widgets/fullscreenbackground.cpp + fixPath ${deepin-wallpapers} /usr/share/wallpapers src/session-widgets/userinfo.cpp + fixPath ${deepin-wallpapers} /usr/share/wallpapers src/widgets/fullscreenbackground.cpp + + ###!substituteInPlace src/app/lightdm-deepin-greeter.cpp --replace /usr/share/icons/deepin ${deepin-icon-theme}/share/icons/bloom + + # It seems there is not a default cursor theme in NixOS. Nonetheless... + substituteInPlace src/global_util/constants.h --replace {/usr,/run/current-system/sw}/share/icons/default/index.theme + + # https://github.com/linuxdeepin/dde-session-shell/issues/3 + sed -i '/darrowrectangle/d' CMakeLists.txt src/widgets/widgets.pri + ###!sed -i 's/include "darrowrectangle.h"/include /' src/widgets/errortooltip.h + + # We don't have common-auth + substituteInPlace src/libdde-auth/authagent.cpp --replace common-auth system-login + + # TODO: fix + # /etc/deepin/dde-session-ui.conf + # /etc/deepin/dde-shutdown.conf + # /etc/deepin/dde.conf + # /etc/deepin/no_suspend + # /etc/lightdm + # /etc/lightdm/deepin/qt-theme.ini + # /etc/lightdm/lightdm-deepin-greeter.conf + # /usr/bin/deepin-system-monitor + # /var/lib/AccountsService/users + # /var/lib/lightdm/lightdm-deepin-greeter + ''; + + postInstall = '' + chmod +x $out/bin/deepin-greeter + ''; + + postFixup = '' + searchHardCodedPaths $out # debugging + ''; + + passthru.updateScript = deepin.updateScript { inherit pname version src; }; + + meta = with stdenv.lib; { + description = "Deepin desktop-environment - session-shell module"; + homepage = "https://github.com/linuxdeepin/dde-session-shell"; + license = licenses.lgpl3; + platforms = platforms.linux; + maintainers = with maintainers; [ romildo ]; + }; +} diff --git a/pkgs/desktops/deepin/dde-session-ui/default.nix b/pkgs/desktops/deepin/dde-session-ui/default.nix index ff785f16c81df..1b426f24cfb55 100644 --- a/pkgs/desktops/deepin/dde-session-ui/default.nix +++ b/pkgs/desktops/deepin/dde-session-ui/default.nix @@ -1,26 +1,29 @@ { stdenv , mkDerivation , fetchFromGitHub -, pkgconfig +, pkg-config , qmake , dbus , dde-daemon +, dde-dock , dde-qt-dbus-factory , deepin +, deepin-desktop-base , deepin-desktop-schemas , deepin-gettext-tools , deepin-icon-theme , deepin-wallpapers -, dtkcore , dtkwidget +, glib , gnugrep , gsettings-qt , lightdm_qt -, onboard +#, onboard +, qtmultimedia , qtsvg , qttools , qtx11extras -, setxkbmap +#, setxkbmap , utillinux , which , xkeyboard_config @@ -31,18 +34,18 @@ mkDerivation rec { pname = "dde-session-ui"; - version = "5.0.0"; + version = "5.3.0.2"; src = fetchFromGitHub { owner = "linuxdeepin"; repo = pname; rev = version; - sha256 = "1gy9nlpkr9ayrs1z2dvd7h0dqlw6fq2m66d9cs48qyfkr6c8l9jj"; + sha256 = "0n60jr7ivjh1h8h4jlk7wg9mjimsh4di1sr32z1j9n70y8vmvgx2"; }; nativeBuildInputs = [ - pkgconfig qmake + pkg-config qttools deepin-gettext-tools wrapGAppsHook @@ -52,19 +55,21 @@ mkDerivation rec { buildInputs = [ dbus dde-daemon + dde-dock dde-qt-dbus-factory + deepin-desktop-base deepin-desktop-schemas deepin-icon-theme deepin-wallpapers - dtkcore dtkwidget gnugrep gsettings-qt lightdm_qt - onboard + #onboard + qtmultimedia qtsvg qtx11extras - setxkbmap + #setxkbmap utillinux which xkeyboard_config @@ -81,10 +86,17 @@ mkDerivation rec { substituteInPlace translate_desktop.sh --replace "/usr/bin/deepin-desktop-ts-convert" "deepin-desktop-ts-convert" + fixPath ${deepin-desktop-base} /etc/deepin-version dde-welcome/utils.cpp + fixPath ${deepin-desktop-base} /etc/deepin-version lightdm-deepin-greeter/view/logowidget.cpp + + # ?????????????????????????? find -type f -exec sed -i -e "s,path = /etc,path = $out/etc," {} + find -type f -exec sed -i -e "s,path = /usr,path = $out," {} + + find -type f -exec sed -i -e "s,/usr/share/dde-session-ui,$out/share/dde-session-ui," {} + + substituteInPlace dde-notification-plugin/notifications/notifications.pro --replace /usr/include/dde-dock ${dde-dock}/include/dde-dock + substituteInPlace dde-osd/dde-osd_autostart.desktop --replace "Exec=/usr/lib/deepin-daemon/dde-osd" "Exec=$out/lib/deepin-daemon/dde-osd" substituteInPlace dde-osd/com.deepin.dde.osd.service --replace "Exec=/usr/lib/deepin-daemon/dde-osd" "Exec=$out/lib/deepin-daemon/dde-osd" substituteInPlace dde-lock/com.deepin.dde.lockFront.service --replace "Exec=/usr/bin/dde-lock" "Exec=$out/bin/dde-lock" @@ -106,7 +118,6 @@ mkDerivation rec { substituteInPlace dmemory-warning-dialog/src/buttondelegate.cpp --replace "dbus-send" "${dbus}/bin/dbus-send" substituteInPlace dmemory-warning-dialog/src/buttondelegate.cpp --replace "kill" "${utillinux}/bin/dbus-send" substituteInPlace global_util/xkbparser.h --replace "/usr/share/X11/xkb/rules/base.xml" "${xkeyboard_config}/share/X11/xkb/rules/base.xml" - substituteInPlace lightdm-deepin-greeter/deepin-greeter --replace "/etc/deepin/greeters.d" "$out/etc/deepin/greeters.d" substituteInPlace lightdm-deepin-greeter/main.cpp --replace "/usr/share/icons/deepin" "${deepin-icon-theme}/share/icons/deepin" substituteInPlace lightdm-deepin-greeter/scripts/00-xrandr --replace "egrep" "${gnugrep}/bin/egrep" substituteInPlace lightdm-deepin-greeter/scripts/00-xrandr --replace "xrandr" "${xrandr}/bin/xrandr" @@ -115,10 +126,7 @@ mkDerivation rec { substituteInPlace session-ui-guardien/guardien.cpp --replace "dde-shutdown" "$out/bin/dde-shutdown" substituteInPlace dde-lock/lockworker.cpp --replace "dde-switchtogreeter" "$out/bin/dde-switchtogreeter" substituteInPlace dde-lock/lockworker.cpp --replace "which" "${which}/bin/which" - substituteInPlace session-widgets/userinfo.cpp --replace "/usr/share/wallpapers/deepin" "${deepin-wallpapers}/share/wallpapers/deepin" substituteInPlace widgets/fullscreenbackground.cpp --replace "/usr/share/wallpapers/deepin" "${deepin-wallpapers}/share/wallpapers/deepin" - substituteInPlace widgets/kblayoutwidget.cpp --replace "setxkbmap" "${setxkbmap}/bin/setxkbmap" - substituteInPlace widgets/virtualkbinstance.cpp --replace "onboard" "${onboard}/bin/onboard" # fix default background url substituteInPlace widgets/fullscreenbackground.cpp --replace "/usr/share/backgrounds/default_background.jpg" "${deepin-wallpapers}/share/backgrounds/deepin/desktop.jpg" @@ -131,6 +139,8 @@ mkDerivation rec { dontWrapQtApps = true; preFixup = '' + glib-compile-schemas ${glib.makeSchemaPath "$out" "${pname}-${version}"} + gappsWrapperArgs+=( "''${qtWrapperArgs[@]}" ) diff --git a/pkgs/desktops/deepin/deepin-anything/default.nix b/pkgs/desktops/deepin/deepin-anything/default.nix index 5fa6c93951d0f..73c8bcda440e3 100644 --- a/pkgs/desktops/deepin/deepin-anything/default.nix +++ b/pkgs/desktops/deepin/deepin-anything/default.nix @@ -1,8 +1,7 @@ { stdenv , mkDerivation , fetchFromGitHub -, fetchpatch -, pkgconfig +, pkg-config , qtbase , udisks2-qt5 , utillinux @@ -12,29 +11,19 @@ mkDerivation rec { pname = "deepin-anything"; - version = "5.0.1"; + version = "5.0.1-1"; src = fetchFromGitHub { owner = "linuxdeepin"; repo = pname; rev = version; - sha256 = "1kvyffrii4b012f6ld1ih14qrn7gg5cxbdpbkac0wxb22hnz0azm"; + sha256 = "023qw4npmlp5ydxp1dnkqmqblcqa6vb8f5891w9lwxslydmijjnj"; }; - patches = [ - # fix compilation error and add support to kernel 5.6 - # https://github.com/linuxdeepin/deepin-anything/pull/27 - (fetchpatch { - name = "linux-5.6.patch"; - url = "https://github.com/linuxdeepin/deepin-anything/commit/764b820c2bcd7248993349b32f91043fc58ee958.patch"; - sha256 = "1ww4xllxc2s04px6fy8wp5cyw54xaz155ry30sqz21vl8awfr36h"; - }) - ]; - outputs = [ "out" "modsrc" ]; nativeBuildInputs = [ - pkgconfig + pkg-config deepin.setupHook ]; @@ -63,6 +52,8 @@ mkDerivation rec { server/tool/com.deepin.anything.service \ server/monitor/deepin-anything-monitor.service sed -e 's,/lib/systemd,$$PREFIX/lib/systemd,' -i server/monitor/src/src.pro server/tool/tool.pro + + sed -i '/^QMAKE_PKGCONFIG_LIBDIR/i QMAKE_PKGCONFIG_PREFIX = $$PREFIX' server/lib/lib.pro ''; postFixup = '' diff --git a/pkgs/desktops/deepin/deepin-calculator/default.nix b/pkgs/desktops/deepin/deepin-calculator/default.nix index 67ead7d314aaf..912bfd25b6a51 100644 --- a/pkgs/desktops/deepin/deepin-calculator/default.nix +++ b/pkgs/desktops/deepin/deepin-calculator/default.nix @@ -1,44 +1,40 @@ { stdenv , mkDerivation , fetchFromGitHub -, pkgconfig -, qmake -, qttools -, qtsvg -, dtkcore +, pkg-config +, cmake , dtkwidget +, qttools , deepin }: mkDerivation rec { pname = "deepin-calculator"; - version = "5.0.1"; + version = "5.5.28"; src = fetchFromGitHub { owner = "linuxdeepin"; repo = pname; rev = version; - sha256 = "0f26y7b3giybybhvlzbnwcw8kidzvhq66h0c15n9ww81gnlqf7v5"; + sha256 = "00ld72rrfijhiqzhvhy2lyn7x2hmlmpdf7kksxajy2c7kzv3h0jp"; }; nativeBuildInputs = [ - qmake - pkgconfig + cmake + pkg-config qttools deepin.setupHook ]; buildInputs = [ - dtkcore dtkwidget - qtsvg ]; postPatch = '' searchHardCodedPaths # debugging patchShebangs translate_generation.sh - fixPath $out /usr deepin-calculator.pro - substituteInPlace deepin-calculator.desktop --replace "Exec=deepin-calculator" "Exec=$out/bin/deepin-calculator" + fixPath $out /usr CMakeLists.txt + substituteInPlace deepin-calculator.desktop --replace Exec=deepin-calculator Exec=$out/bin/deepin-calculator ''; postFixup = '' diff --git a/pkgs/desktops/deepin/deepin-desktop-base/default.nix b/pkgs/desktops/deepin/deepin-desktop-base/default.nix index 74fa53b715d0f..0df402aa92ae6 100644 --- a/pkgs/desktops/deepin/deepin-desktop-base/default.nix +++ b/pkgs/desktops/deepin/deepin-desktop-base/default.nix @@ -1,18 +1,18 @@ { stdenv , fetchFromGitHub -, deepin-wallpapers , deepin +, nixos-icons }: stdenv.mkDerivation rec { pname = "deepin-desktop-base"; - version = "2019.07.10"; + version = "2020.07.31"; src = fetchFromGitHub { owner = "linuxdeepin"; repo = pname; rev = version; - sha256 = "0rs7bjy35k5gc5nbba1cijhdz16zny30lgmcf2ckx1pkdszk2vra"; + sha256 = "1sk8sy9hbkncmqzi9j93ww6abavx7s1l2k4ix60kmrfx16lpliyx"; }; nativeBuildInputs = [ @@ -20,46 +20,59 @@ stdenv.mkDerivation rec { ]; buildInputs = [ - deepin-wallpapers + nixos-icons ]; - # TODO: Fedora recommended dependencies: - # deepin-wallpapers - # plymouth-theme-deepin - postPatch = '' searchHardCodedPaths fixPath $out /etc Makefile fixPath $out /usr Makefile + fixPath $out /var Makefile + ''; + postInstall = '' # Remove Deepin distro's lsb-release + rm $out/etc/lsb-release + # Don't override systemd timeouts + rm -r $out/etc/systemd + + # Remove UOS logo + # TODO: Fix reference to uos_logo.svg in share/deepin/dde-desktop-watermask.json + rm $out/share/deepin/uos_logo.svg + + # Remove UOS license + rm $out/var/uos/os-license + rmdir $out/var/uos + rmdir $out/var + # Remove apt-specific templates - echo ---------------------------------------------------------------- - echo grep --color=always -E 'lsb-release|systemd|python-apt|backgrounds' Makefile - grep --color=always -E 'lsb-release|systemd|python-apt|backgrounds' Makefile - echo ---------------------------------------------------------------- - sed -i -E '/lsb-release|systemd|python-apt|backgrounds/d' Makefile - ''; + rm -r $out/share/python-apt - postInstall = '' # Make a symlink for deepin-version ln -s ../lib/deepin/desktop-version $out/etc/deepin-version + + # Install distribution.info + cat > $out/share/deepin/distribution.info < bloom naming change # https://github.com/linuxdeepin/deepin-icon-theme/pull/24 substituteInPlace tools/hicolor.links --replace deepin bloom - substituteInPlace Sea/index.theme --replace Inherits=deepin Inherits=bloom + # fix: update the parent theme name + for f in Sea/index.theme bloom-{dark,fantacy}/cursor.theme ; do + substituteInPlace $f --replace Inherits=deepin Inherits=bloom + done ''; installPhase = '' runHook preInstall mkdir -p $out/share/icons - cp -vai bloom* Sea $out/share/icons + cp -a bloom* Sea $out/share/icons + + # TODO: bloom-classic fails building the cache + rm -rf $out/share/icons/bloom-classic - for theme in $out/share/icons/*; do + #for theme in $out/share/icons/{bloom{,-dark,-classic,-classic-dark},Sea}; do + for theme in $out/share/icons/{bloom{,-dark,-classic-dark},Sea}; do + echo ========= $theme gtk-update-icon-cache $theme done - cp -vai usr/share/icons/hicolor $out/share/icons + cp -a usr/share/icons/hicolor $out/share/icons runHook postInstall ''; diff --git a/pkgs/desktops/deepin/deepin-image-viewer/default.nix b/pkgs/desktops/deepin/deepin-image-viewer/default.nix index 43c18c85abcbd..2a76f29ce84c9 100644 --- a/pkgs/desktops/deepin/deepin-image-viewer/default.nix +++ b/pkgs/desktops/deepin/deepin-image-viewer/default.nix @@ -1,58 +1,71 @@ { stdenv , mkDerivation , fetchFromGitHub -, pkgconfig +, pkg-config , qmake -, qttools -, qtsvg -, qtx11extras , dtkcore +, dtkgui , dtkwidget -, qt5integration , freeimage -, libraw +, gio-qt , libexif +, libraw +, qtmultimedia +, qtsvg +, qttools +, qtx11extras +, udisks2-qt5 , deepin }: mkDerivation rec { pname = "deepin-image-viewer"; - version = "5.0.0"; + version = "5.6.3.2"; src = fetchFromGitHub { owner = "linuxdeepin"; repo = pname; rev = version; - sha256 = "01524hfdy3wvdf07n9b3qb8jdpxzg2hwjpl4gxvr68qws5nbnb3c"; + sha256 = "02b5dkm9hcjhafvp0s7ssr7zal63xy8z0b8ax466b3dpsmrps851"; }; nativeBuildInputs = [ - pkgconfig + pkg-config qmake qttools deepin.setupHook ]; buildInputs = [ - qtsvg - qtx11extras dtkcore + dtkgui dtkwidget - qt5integration freeimage - libraw + gio-qt libexif + libraw + qtmultimedia + qtsvg + qtx11extras + udisks2-qt5 ]; postPatch = '' - searchHardCodedPaths + searchHardCodedPaths # debugging + patchShebangs viewer/generate_translations.sh + fixPath $out /usr viewer/com.deepin.ImageViewer.service + sed -i qimage-plugins/freeimage/freeimage.pro \ qimage-plugins/libraw/libraw.pro \ -e "s,\$\$\[QT_INSTALL_PLUGINS\],$out/$qtPluginPrefix," ''; + postFixup = '' + searchHardCodedPaths $out # debugging + ''; + passthru.updateScript = deepin.updateScript { inherit pname version src; }; meta = with stdenv.lib; { diff --git a/pkgs/desktops/deepin/deepin-menu/default.nix b/pkgs/desktops/deepin/deepin-menu/default.nix index 983fe4e1c4d5a..5caa7d4743352 100644 --- a/pkgs/desktops/deepin/deepin-menu/default.nix +++ b/pkgs/desktops/deepin/deepin-menu/default.nix @@ -1,35 +1,41 @@ { stdenv , mkDerivation , fetchFromGitHub -, pkgconfig +, pkg-config , qmake , dtkcore +, dtkgui , dtkwidget , qt5integration +, qtmultimedia +, qtx11extras , deepin }: mkDerivation rec { pname = "deepin-menu"; - version = "3.4.8"; + version = "5.0.1"; src = fetchFromGitHub { owner = "linuxdeepin"; repo = pname; rev = version; - sha256 = "09i0ybllymlj7s46pxma5py6x8nknfja4gxn5gj9kpf2c37qsqjc"; + sha256 = "0fqby41s0jph31g1hhq7v006k37z9q3q2xnd8aiy0rkriph7z5xd"; }; nativeBuildInputs = [ - pkgconfig + pkg-config qmake deepin.setupHook ]; buildInputs = [ dtkcore + dtkgui dtkwidget qt5integration + qtmultimedia + qtx11extras ]; postPatch = '' @@ -40,8 +46,6 @@ mkDerivation rec { deepin-menu.pro ''; - enableParallelBuilding = true; - passthru.updateScript = deepin.updateScript { inherit pname version src; }; meta = with stdenv.lib; { diff --git a/pkgs/desktops/deepin/deepin-movie-reborn/default.nix b/pkgs/desktops/deepin/deepin-movie-reborn/default.nix index 68daffb0d1570..baf4b186e4bdb 100644 --- a/pkgs/desktops/deepin/deepin-movie-reborn/default.nix +++ b/pkgs/desktops/deepin/deepin-movie-reborn/default.nix @@ -3,46 +3,52 @@ , fetchFromGitHub , fetchpatch , cmake -, pkgconfig +, pkg-config , qttools , qtx11extras -, dtkcore , dtkwidget +, qt5integration +, glib , ffmpeg_3 , ffmpegthumbnailer +, gsettings-qt , mpv , pulseaudio , libdvdnav , libdvdread , xorg , deepin +, wrapGAppsHook }: mkDerivation rec { pname = "deepin-movie-reborn"; - version = "5.0.0"; + version = "5.7.6.29"; src = fetchFromGitHub { owner = "linuxdeepin"; repo = pname; rev = version; - sha256 = "0cly8q0514a58s3h3wsvx9yxar7flz6i2q8xkrkfjias22b3z7b0"; + sha256 = "1780hazkgz4imiy3d8pl22laasvys46rddh7ijzwsvi8b5dx02wm"; }; outputs = [ "out" "dev" ]; nativeBuildInputs = [ cmake - pkgconfig + pkg-config qttools + glib + wrapGAppsHook deepin.setupHook ]; buildInputs = [ - dtkcore dtkwidget + qt5integration ffmpeg_3 ffmpegthumbnailer + gsettings-qt libdvdnav libdvdread mpv @@ -54,25 +60,37 @@ mkDerivation rec { xorg.xcbproto ]; - patches = [ - # fix: build failed if cannot find dtk-settings tool - (fetchpatch { - url = "https://github.com/linuxdeepin/deepin-movie-reborn/commit/fbb307b.patch"; - sha256 = "0915za0khki0729rvcfpxkh6vxhqwc47cgcmjc90kfq1004221vx"; - }) - ]; - NIX_LDFLAGS = "-ldvdnav"; postPatch = '' searchHardCodedPaths # debugging - sed -i src/libdmr/libdmr.pc.in -e "s,/usr,$out," -e 's,libdir=''${prefix}/,libdir=,' + substituteInPlace src/libdmr/libdmr.pc.in \ + --replace /usr $out \ + --replace 'libdir=''${prefix}/' 'libdir=' + + substituteInPlace src/CMakeLists.txt \ + --replace /usr $out substituteInPlace src/deepin-movie.desktop \ --replace "Exec=deepin-movie" "Exec=$out/bin/deepin-movie" ''; + dontWrapQtApps = true; + + preFixup = '' + glib-compile-schemas ${glib.makeSchemaPath "$out" "${pname}-${version}"} + + gappsWrapperArgs+=( + "''${qtWrapperArgs[@]}" + ) + ''; + + postFixup = '' + searchHardCodedPaths $out # debugging + searchHardCodedPaths $dev # debugging + ''; + passthru.updateScript = deepin.updateScript { inherit pname version src; }; meta = with stdenv.lib; { diff --git a/pkgs/desktops/deepin/deepin-screen-recorder/default.nix b/pkgs/desktops/deepin/deepin-screen-recorder/default.nix new file mode 100644 index 0000000000000..a6ade4cd35c23 --- /dev/null +++ b/pkgs/desktops/deepin/deepin-screen-recorder/default.nix @@ -0,0 +1,68 @@ +{ stdenv +, mkDerivation +, fetchFromGitHub +, pkg-config +, qmake +, dde-qt-dbus-factory +, dtkcore +, dtkgui +, dtkwidget +, libXtst +, libxcb +, procps +, qtmultimedia +, qttools +, qtx11extras +, deepin +}: + +mkDerivation rec { + pname = "deepin-screen-recorder"; + version = "5.8.0.11"; + + src = fetchFromGitHub { + owner = "linuxdeepin"; + repo = pname; + rev = version; + sha256 = "1wn6qf8mf4bmr37psf63nbfh6d3v57vyqrmj50mil9cpsypcynah"; + }; + + nativeBuildInputs = [ + qmake + pkg-config + qttools + deepin.setupHook + ]; + + buildInputs = [ + dde-qt-dbus-factory + dtkcore + dtkgui + dtkwidget + libXtst + libxcb + procps + qtmultimedia + qtx11extras + ]; + + postPatch = '' + searchHardCodedPaths + fixPath $out /etc screen_shot_recorder.pro + fixPath $out /usr screen_shot_recorder.pro + ''; + + postFixup = '' + searchHardCodedPaths $out + ''; + + passthru.updateScript = deepin.updateScript { inherit pname version src; }; + + meta = with stdenv.lib; { + description = "Calendar for Deepin Desktop Environment"; + homepage = "https://github.com/linuxdeepin/deepin-screen-recorder"; + license = licenses.gpl3; + platforms = platforms.linux; + maintainers = with maintainers; [ romildo ]; + }; +} diff --git a/pkgs/desktops/deepin/deepin-shortcut-viewer/default.nix b/pkgs/desktops/deepin/deepin-shortcut-viewer/default.nix index 76d8847b73fce..b83623bae4f19 100644 --- a/pkgs/desktops/deepin/deepin-shortcut-viewer/default.nix +++ b/pkgs/desktops/deepin/deepin-shortcut-viewer/default.nix @@ -1,9 +1,10 @@ { stdenv , mkDerivation , fetchFromGitHub -, pkgconfig +, pkg-config , qmake , dtkcore +, dtkgui , dtkwidget , qt5integration , deepin @@ -11,27 +12,35 @@ mkDerivation rec { pname = "deepin-shortcut-viewer"; - version = "5.0.0"; + version = "5.0.2"; src = fetchFromGitHub { owner = "linuxdeepin"; repo = pname; rev = version; - sha256 = "13vz8kjdqkrhgpvdgrvwn62vwzbyqp88hjm5m4rcqg3bh56709ma"; + sha256 = "0wgfbpf90xgl78q526gdn6cpnrkkr6a2d0axgabnijs608i9wfpc"; }; nativeBuildInputs = [ - pkgconfig + pkg-config qmake + deepin.setupHook ]; buildInputs = [ dtkcore + dtkgui dtkwidget qt5integration ]; - enableParallelBuilding = true; + postPatch = '' + searchHardCodedPaths # debugging + '' ; + + postFixup = '' + searchHardCodedPaths $out # debugging + '' ; passthru.updateScript = deepin.updateScript { inherit pname version src; }; diff --git a/pkgs/desktops/deepin/deepin-sound-theme/default.nix b/pkgs/desktops/deepin/deepin-sound-theme/default.nix index e71c0cb77c5bd..ae73c5f9f6548 100644 --- a/pkgs/desktops/deepin/deepin-sound-theme/default.nix +++ b/pkgs/desktops/deepin/deepin-sound-theme/default.nix @@ -5,13 +5,13 @@ stdenv.mkDerivation rec { pname = "deepin-sound-theme"; - version = "15.10.3"; + version = "15.10.6"; src = fetchFromGitHub { owner = "linuxdeepin"; repo = "deepin-sound-theme"; rev = version; - sha256 = "1sw4nrn7q7wk1hpicm05apyc0mihaw42iqm52wb8ib8gm1qiylr9"; + sha256 = "1rgcfnynwdwqjsms80yvyr7wcdfc0an05crlp01sncsz0v5bzw86"; }; makeFlags = [ diff --git a/pkgs/desktops/deepin/deepin-terminal/default.nix b/pkgs/desktops/deepin/deepin-terminal/default.nix index ae31213794278..11171295a4aec 100644 --- a/pkgs/desktops/deepin/deepin-terminal/default.nix +++ b/pkgs/desktops/deepin/deepin-terminal/default.nix @@ -1,104 +1,94 @@ { stdenv +, mkDerivation , fetchFromGitHub -, pkgconfig , cmake -, ninja -, vala_0_40 -, fetchpatch -, gettext +, pkg-config , at-spi2-core -, dbus -, epoxy -, expect -, gtk3 -, json-glib -, libXdmcp -, libgee -, libpthreadstubs -, librsvg -, libsecret -, libtasn1 -, libxcb -, libxkbcommon -, p11-kit -, pcre -, vte -, wnck -, libselinux -, gnutls -, pcre2 -, libsepol -, utillinux -, deepin-menu +, dde-qt-dbus-factory , deepin-shortcut-viewer +, dtkcore +, dtkwidget +, expect +, lxqt +, qtbase +, qttools , deepin , wrapGAppsHook }: -stdenv.mkDerivation rec { +mkDerivation rec { pname = "deepin-terminal"; - version = "5.0.0"; + version = "5.2.22"; src = fetchFromGitHub { owner = "linuxdeepin"; repo = "deepin-terminal"; rev = version; - sha256 = "1929saj828b438d07caw3cjhqq60v6gni7mi3fqrg9wdjz81xwv7"; + sha256 = "17ljkb3a03yh9gkhzy9rd4ajf6k5wh507wj1cxlgaakbv01qhx3n"; }; - patches = [ - # Fix build with VTE 0.60 - (fetchpatch { - url = "https://github.com/linuxdeepin/deepin-terminal/commit/542d1035b609698ee81aa7971d20ca8e5930743d.patch"; - sha256 = "1pihiy70yc25fm5fx7i7v9gmi65v4mhldvi7xwv8rgr2z6hbfj41"; - }) - ]; - nativeBuildInputs = [ - pkgconfig cmake - ninja - vala_0_40 # xcb.vapi:411.3-411.48: error: missing return statement at end of subroutine body - gettext - libselinux libsepol utillinux # required by gio + pkg-config + qttools + lxqt.lxqt-build-tools deepin.setupHook wrapGAppsHook ]; buildInputs = [ at-spi2-core - dbus - deepin-menu + dde-qt-dbus-factory deepin-shortcut-viewer - epoxy + dtkcore expect - gtk3 - json-glib - libXdmcp - libgee - libpthreadstubs - librsvg - libsecret - libtasn1 - libxcb - libxkbcommon - p11-kit - pcre - vte - wnck - gnutls - pcre2 + qtbase + ]; + + propagatedBuildInputs = [ + dtkwidget + ]; + + cmakeFlags = [ + # to be able to find dtk-settings-tools + "-DDTKCORE_TOOL_DIR=${dtkcore}/lib/libdtk-${dtkcore.version}/DCore/bin" ]; postPatch = '' searchHardCodedPaths + + fixPath $out /usr 3rdparty/terminalwidget/CMakeLists.txt + + fixPath $out /usr/bin/deepin-terminal 3rdparty/terminalwidget/lib/Pty.cpp + + fixPath ${expect} /usr/bin/expect src/assets/other/ssh_login.sh + + substituteInPlace src/deepin-terminal.desktop --replace "Exec=deepin-terminal" "Exec=$out/bin/deepin-terminal" + + substituteInPlace src/main/mainwindow.cpp --replace "deepin-shortcut-viewer" "${deepin-shortcut-viewer}/bin/deepin-shortcut-viewer" + + substituteInPlace src/views/termwidget.cpp --replace "/bin/bash" "${stdenv.shell}" + + # from archlinux + sed -i '/LXQtCompilerSettings/a remove_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII)' 3rdparty/terminalwidget/CMakeLists.txt + sed -i 's|default-config.json|src/assets/other/default-config.json|' CMakeLists.txt + + # avoid error: + # file cannot create directory: /homeless-shelter/.config/deepin/deepin-terminal + export HOME=$TMP ''; - cmakeFlags = [ - "-DTEST_BUILD=OFF" - "-DUSE_VENDOR_LIB=OFF" - "-DVERSION=${version}" - ]; + dontWrapQtApps = true; + + preFixup = '' + gappsWrapperArgs+=( + "''${qtWrapperArgs[@]}" + ) + ''; + + postFixup = '' + searchHardCodedPaths $out + ''; passthru.updateScript = deepin.updateScript { inherit pname version src; }; diff --git a/pkgs/desktops/deepin/default.nix b/pkgs/desktops/deepin/default.nix index b177b2ccf3560..162d891547a3c 100644 --- a/pkgs/desktops/deepin/default.nix +++ b/pkgs/desktops/deepin/default.nix @@ -23,6 +23,7 @@ let dde-network-utils = callPackage ./dde-network-utils { }; dde-polkit-agent = callPackage ./dde-polkit-agent { }; dde-qt-dbus-factory = callPackage ./dde-qt-dbus-factory { }; + dde-session-shell = callPackage ./dde-session-shell { }; dde-session-ui = callPackage ./dde-session-ui { }; deepin-anything = callPackage ./deepin-anything { }; deepin-calculator = callPackage ./deepin-calculator { }; @@ -35,18 +36,19 @@ let deepin-image-viewer = callPackage ./deepin-image-viewer { }; deepin-menu = callPackage ./deepin-menu { }; deepin-movie-reborn = callPackage ./deepin-movie-reborn { }; + deepin-screen-recorder = callPackage ./deepin-screen-recorder { }; deepin-shortcut-viewer = callPackage ./deepin-shortcut-viewer { }; deepin-sound-theme = callPackage ./deepin-sound-theme { }; - deepin-terminal = callPackage ./deepin-terminal { - wnck = pkgs.libwnck3; - }; + deepin-terminal = callPackage ./deepin-terminal { }; deepin-turbo = callPackage ./deepin-turbo { }; deepin-wallpapers = callPackage ./deepin-wallpapers { }; disomaster = callPackage ./disomaster { }; dpa-ext-gnomekeyring = callPackage ./dpa-ext-gnomekeyring { }; dtkcore = callPackage ./dtkcore { }; + dtkgui = callPackage ./dtkgui { }; dtkwidget = callPackage ./dtkwidget { }; dtkwm = callPackage ./dtkwm { }; + gio-qt = callPackage ./gio-qt { }; go-dbus-factory = callPackage ./go-dbus-factory { }; go-gir-generator = callPackage ./go-gir-generator { }; go-lib = callPackage ./go-lib { }; diff --git a/pkgs/desktops/deepin/dpa-ext-gnomekeyring/default.nix b/pkgs/desktops/deepin/dpa-ext-gnomekeyring/default.nix index 2caef7ce91661..40aa5e4f60e6c 100644 --- a/pkgs/desktops/deepin/dpa-ext-gnomekeyring/default.nix +++ b/pkgs/desktops/deepin/dpa-ext-gnomekeyring/default.nix @@ -10,13 +10,13 @@ stdenv.mkDerivation rec { pname = "dpa-ext-gnomekeyring"; - version = "5.0.1"; + version = "5.0.2"; src = fetchFromGitHub { owner = "linuxdeepin"; repo = pname; rev = version; - sha256 = "168j42nwyw7vcgwc0fha2pjpwwlgir70fq1hns4ia1dkdqa1nhzw"; + sha256 = "032m481sx8q25z10jbja7ix1x9z2a629c86lf9b5wx3q9jb00dkq"; }; nativeBuildInputs = [ diff --git a/pkgs/desktops/deepin/dtkcore/default.nix b/pkgs/desktops/deepin/dtkcore/default.nix index 570b0cc2c11ea..fcf6399f715a1 100644 --- a/pkgs/desktops/deepin/dtkcore/default.nix +++ b/pkgs/desktops/deepin/dtkcore/default.nix @@ -1,56 +1,79 @@ { stdenv , mkDerivation , fetchFromGitHub -, pkgconfig +, pkg-config , qmake +, glib +, deepin-desktop-base , gsettings-qt +, lshw , pythonPackages , deepin }: mkDerivation rec { pname = "dtkcore"; - version = "2.1.1"; + version = "5.2.2.3"; src = fetchFromGitHub { owner = "linuxdeepin"; repo = pname; rev = version; - sha256 = "0xdh6mmrv8yr6mjmlwj0fv037parkkwfwlaibcbrskwxqp9iri1y"; + sha256 = "1w5zclf6vqninwhsmir27aaasrqqhp0gnpq3ipm61b5makflg0k2"; }; nativeBuildInputs = [ - pkgconfig + pkg-config qmake pythonPackages.wrapPython + glib deepin.setupHook ]; buildInputs = [ + deepin-desktop-base gsettings-qt + lshw ]; postPatch = '' searchHardCodedPaths # debugging + fixPath ${deepin-desktop-base} /etc/deepin-version src/dsysinfo.cpp + + substituteInPlace src/dsysinfo.cpp --replace \"lshw\" \"${lshw}/bin/lshw\" + # Fix shebang - sed -i tools/script/dtk-translate.py -e "s,#!env,#!/usr/bin/env," + substituteInPlace tools/script/dtk-translate.py --replace "#!env" "#!/usr/bin/env" + + # Fix paths for other dtk modules (which depends on dtkcore) + substituteInPlace dtk_build_config.prf \ + --replace \ + 'LIB_INSTALL_DIR=$''${QT.dtkcore.libs}' \ + 'LIB_INSTALL_DIR=$$PREFIX/lib' \ + --replace \ + 'INCLUDE_INSTALL_DIR = $''${QT.dtkcore.includes}/../$$DMODULE_NAME' \ + 'INCLUDE_INSTALL_DIR = $$PREFIX/include/$$LIB_VERSION_NAME/$$DMODULE_NAME' ''; qmakeFlags = [ "DTK_VERSION=${version}" - "LIB_INSTALL_DIR=${placeholder "out"}/lib" "MKSPECS_INSTALL_DIR=${placeholder "out"}/mkspecs" + "QMAKE_PKGCONFIG_PREFIX=${placeholder "out"}" ]; + preFixup = '' + glib-compile-schemas ${glib.makeSchemaPath "$out" "${pname}-${version}"} + ''; + postFixup = '' - chmod +x $out/lib/libdtk-${version}/DCore/bin/*.py - wrapPythonProgramsIn "$out/lib/libdtk-${version}/DCore/bin" "$out $pythonPath" + chmod +x $out/lib/libdtk-*/DCore/bin/*.py + wrapPythonProgramsIn $out/lib/libdtk-*/DCore/bin "$out $pythonPath" + wrapQtApp $out/lib/libdtk-*/DCore/bin/deepin-os-release + wrapQtApp $out/lib/libdtk-*/DCore/bin/dtk-settings searchHardCodedPaths $out # debugging ''; - enableParallelBuilding = true; - passthru.updateScript = deepin.updateScript { inherit pname version src; }; meta = with stdenv.lib; { diff --git a/pkgs/desktops/deepin/dtkgui/default.nix b/pkgs/desktops/deepin/dtkgui/default.nix new file mode 100644 index 0000000000000..c59c34c10515e --- /dev/null +++ b/pkgs/desktops/deepin/dtkgui/default.nix @@ -0,0 +1,65 @@ +{ stdenv +, mkDerivation +, fetchFromGitHub +, pkg-config +, qmake +, dtkcore +, librsvg +, qtx11extras +, deepin +}: + +mkDerivation rec { + pname = "dtkgui"; + version = "5.2.2.1"; + + src = fetchFromGitHub { + owner = "linuxdeepin"; + repo = pname; + rev = version; + sha256 = "0d9f6q4dfl0h3jv36srjyghaj4j0hf28br1xnz0rag6a8qs28ciw"; + }; + + nativeBuildInputs = [ + pkg-config + qmake + deepin.setupHook + ]; + + buildInputs = [ + librsvg + qtx11extras + ]; + + propagatedBuildInputs = [ + dtkcore + ]; + + qmakeFlags = [ + "MKSPECS_INSTALL_DIR=${placeholder "out"}/mkspecs" + "QMAKE_PKGCONFIG_PREFIX=${placeholder "out"}" + ]; + + postPatch = '' + searchHardCodedPaths # for debugging + + # fix systembusconf path + fixPath $out /etc src/src.pro + ''; + + postFixup = '' + wrapQtApp $out/lib/libdtk-*/DGui/bin/deepin-gui-settings + wrapQtApp $out/lib/libdtk-*/DGui/bin/taskbar + searchHardCodedPaths $out # for debugging + ''; + + passthru.updateScript = deepin.updateScript { inherit pname version src; }; + + meta = with stdenv.lib; { + description = "Gui module for DDE look and feel"; + homepage = "https://github.com/linuxdeepin/dtkgui"; + license = licenses.lgpl3; + platforms = platforms.linux; + maintainers = with maintainers; [ romildo ]; + }; +} diff --git a/pkgs/desktops/deepin/dtkwidget/default.nix b/pkgs/desktops/deepin/dtkwidget/default.nix index 9be222830db45..ae654b09beba1 100644 --- a/pkgs/desktops/deepin/dtkwidget/default.nix +++ b/pkgs/desktops/deepin/dtkwidget/default.nix @@ -1,7 +1,7 @@ { stdenv , mkDerivation , fetchFromGitHub -, pkgconfig +, pkg-config , qmake , qttools , qtmultimedia @@ -11,25 +11,26 @@ , libstartup_notification , gsettings-qt , dde-qt-dbus-factory -, dtkcore +, dtkgui , deepin }: mkDerivation rec { pname = "dtkwidget"; - version = "2.1.1"; + version = "5.2.2.3"; src = fetchFromGitHub { owner = "linuxdeepin"; repo = pname; rev = version; - sha256 = "0yqrm1p0k1843ldvcd79dxl26ybyl5kljl6vwhzc58sx7pw4qmvh"; + sha256 = "02p6dd3skwflbmcw2qbfm2y597h7pdnknhsqj3k840isx7hi8hbv"; }; nativeBuildInputs = [ - pkgconfig + pkg-config qmake qttools + deepin.setupHook ]; buildInputs = [ @@ -40,18 +41,25 @@ mkDerivation rec { libstartup_notification gsettings-qt dde-qt-dbus-factory - dtkcore ]; - outRef = placeholder "out"; + propagatedBuildInputs = [ + dtkgui + ]; qmakeFlags = [ - "INCLUDE_INSTALL_DIR=${outRef}/include" - "LIB_INSTALL_DIR=${outRef}/lib" - "QT_HOST_DATA=${outRef}" + "MKSPECS_INSTALL_DIR=${placeholder "out"}/mkspecs" + "QMAKE_PKGCONFIG_PREFIX=${placeholder "out"}" ]; - enableParallelBuilding = true; + postPatch = '' + searchHardCodedPaths # debugging + ''; + + postFixup = '' + wrapQtApp $out/lib/libdtk-*/DWidget/bin/dtk-svgc + searchHardCodedPaths $out # debugging + ''; passthru.updateScript = deepin.updateScript { inherit pname version src; }; diff --git a/pkgs/desktops/deepin/gio-qt/default.nix b/pkgs/desktops/deepin/gio-qt/default.nix new file mode 100644 index 0000000000000..035593dbe5497 --- /dev/null +++ b/pkgs/desktops/deepin/gio-qt/default.nix @@ -0,0 +1,50 @@ +{ stdenv +, mkDerivation +, fetchFromGitHub +, cmake +, pkg-config +, glibmm +, qtbase +, deepin +}: + +mkDerivation rec { + pname = "gio-qt"; + version = "0.0.9"; + + src = fetchFromGitHub { + owner = "linuxdeepin"; + repo = pname; + rev = version; + sha256 = "1v0bg0r0clfdlp10n6hb4kh7wyszama6mb8q91qhqd741bv0r4m9"; + }; + + nativeBuildInputs = [ + cmake + pkg-config + deepin.setupHook + ]; + + propagatedBuildInputs = [ + glibmm + qtbase + ]; + + postPatch = '' + searchHardCodedPaths # debugging + ''; + + cmakeFlags = [ + "-DBUILD_DOCS=OFF" + ]; + + passthru.updateScript = deepin.updateScript { inherit pname version src; }; + + meta = with stdenv.lib; { + description = "Qt wrapper library of Gio"; + homepage = "https://github.com/linuxdeepin/gio-qt"; + license = licenses.lgpl3; + platforms = platforms.linux; + maintainers = with maintainers; [ romildo ]; + }; +} diff --git a/pkgs/desktops/deepin/go-dbus-factory/default.nix b/pkgs/desktops/deepin/go-dbus-factory/default.nix index 1c1afd9d099c0..f9cb9c632e6e8 100644 --- a/pkgs/desktops/deepin/go-dbus-factory/default.nix +++ b/pkgs/desktops/deepin/go-dbus-factory/default.nix @@ -5,27 +5,35 @@ stdenv.mkDerivation rec { pname = "go-dbus-factory"; - version = "0.9.0"; + version = "1.7.0.6"; src = fetchFromGitHub { owner = "linuxdeepin"; repo = pname; rev = version; - sha256 = "06fqyad9f50gcjsjkh7929yyaprahdjhnd0dr4gl2797a7wysl3f"; + sha256 = "1l37a1cr6hmddfin8aiarmqc4d4x4jrvpjwh8h9xqndaw8xhaivf"; }; + nativeBuildInputs = [ + deepin.setupHook + ]; + makeFlags = [ - "PREFIX=${placeholder "out"}" + "GOSITE_DIR=${placeholder "out"}/share/go" ]; postPatch = '' - sed -i -e 's:/share/gocode:/share/go:' Makefile + searchHardCodedPaths # debugging + ''; + + postFixup = '' + searchHardCodedPaths $out # debugging ''; passthru.updateScript = deepin.updateScript { inherit pname version src; }; meta = with stdenv.lib; { - description = "GoLang DBus factory for the Deepin Desktop Environment"; + description = "Go DBus factory for the Deepin Desktop Environment"; homepage = "https://github.com/linuxdeepin/go-dbus-factory"; license = licenses.gpl3; platforms = platforms.linux; diff --git a/pkgs/desktops/deepin/go-lib/default.nix b/pkgs/desktops/deepin/go-lib/default.nix index 7129d912e30db..46e919ea9044b 100644 --- a/pkgs/desktops/deepin/go-lib/default.nix +++ b/pkgs/desktops/deepin/go-lib/default.nix @@ -3,6 +3,8 @@ , glib , xorg , gdk-pixbuf +, glibc +, isocodes , pulseaudio , mobile-broadband-provider-info , deepin @@ -10,15 +12,19 @@ stdenv.mkDerivation rec { pname = "go-lib"; - version = "5.4.5"; + version = "5.5.0.1"; src = fetchFromGitHub { owner = "linuxdeepin"; repo = pname; rev = version; - sha256 = "021sq7nzvfwsa5ccsb3vdjk53m7cf693xm4wkdkrkf8pja6vz94q"; + sha256 = "128909as236yn6gf92dfwa08zpj5nl5j7wwk2ixfnqgfir66hnwh"; }; + nativeBuildInputs = [ + deepin.setupHook + ]; + buildInputs = [ glib xorg.libX11 @@ -27,6 +33,15 @@ stdenv.mkDerivation rec { mobile-broadband-provider-info ]; + postPatch = '' + searchHardCodedPaths # debugging + + fixPath ${glibc} /usr/share/locale/locale.alias locale/locale.go + fixPath ${isocodes} /usr/share/xml/iso-codes/iso_3166.xml iso/country.go + + substituteInPlace iso/country.go --replace /usr/share/locale /run/current-system/sw/share/locale + ''; + installPhase = '' mkdir -p $out/share/go/src/pkg.deepin.io/lib cp -a * $out/share/go/src/pkg.deepin.io/lib diff --git a/pkgs/desktops/deepin/qt5integration/default.nix b/pkgs/desktops/deepin/qt5integration/default.nix index e3bbaba068bda..6f68dc6c25086 100644 --- a/pkgs/desktops/deepin/qt5integration/default.nix +++ b/pkgs/desktops/deepin/qt5integration/default.nix @@ -1,7 +1,7 @@ { stdenv , mkDerivation , fetchFromGitHub -, pkgconfig +, pkg-config , qmake , mtdev , lxqt @@ -11,28 +11,31 @@ , qt5platform-plugins , qtstyleplugins , dtkcore +, dtkgui , dtkwidget , deepin }: mkDerivation rec { pname = "qt5integration"; - version = "5.0.0"; + version = "5.1.0.4"; src = fetchFromGitHub { owner = "linuxdeepin"; repo = pname; rev = version; - sha256 = "140wb3vcm2ji8jhqdxv8f4shiknia1zk8fssqlp09kzc1cmb4ncy"; + sha256 = "0ir3dkf1xr92pnmcnxbp43s87wp9fnf6ia7xifls3xqf5msz0mmv"; }; nativeBuildInputs = [ - pkgconfig + pkg-config qmake + deepin.setupHook ]; buildInputs = [ dtkcore + dtkgui dtkwidget qt5platform-plugins mtdev @@ -44,14 +47,20 @@ mkDerivation rec { ]; postPatch = '' - sed -i dstyleplugin/dstyleplugin.pro \ - platformthemeplugin/qt5deepintheme-plugin.pro \ - iconengineplugins/svgiconengine/svgiconengine.pro \ - imageformatplugins/svg/svg.pro \ - -e "s,\$\$\[QT_INSTALL_PLUGINS\],$out/$qtPluginPrefix," + searchHardCodedPaths # debugging + + # # TODO: use path from dde-file-manager package (which may cause mutual dependences) + # substituteInPlace platformthemeplugin/qdeepinfiledialoghelper.cpp \ + # --replace /usr/bin/dde-file-manager dde-file-manager + + for f in $(grep -lr QT_INSTALL_PLUGINS); do + substituteInPlace "$f" --replace '$$[QT_INSTALL_PLUGINS]' "$out/$qtPluginPrefix" + done ''; - enableParallelBuilding = true; + postFixup = '' + searchHardCodedPaths $out # debugging + '' ; passthru.updateScript = deepin.updateScript { inherit pname version src; }; diff --git a/pkgs/desktops/deepin/qt5platform-plugins/default.nix b/pkgs/desktops/deepin/qt5platform-plugins/default.nix index 33e4863c0d941..db109a0e7c681 100644 --- a/pkgs/desktops/deepin/qt5platform-plugins/default.nix +++ b/pkgs/desktops/deepin/qt5platform-plugins/default.nix @@ -1,26 +1,28 @@ { stdenv , mkDerivation , fetchFromGitHub -, pkgconfig +, fetchpatch +, pkg-config , qmake -, qtx11extras -, libSM -, mtdev , cairo , deepin +, libSM +, mtdev , qtbase +, qtwayland +, qtx11extras }: mkDerivation rec { pname = "qt5platform-plugins"; - version = "5.0.11"; + version = "5.0.15"; srcs = [ (fetchFromGitHub { owner = "linuxdeepin"; repo = pname; rev = version; - sha256 = "14xkr3p49716jc9v7ksj6jgcmfa65qicqrmablizfi71srg3z2pr"; + sha256 = "1hmg86rfc8g4q1sdljd0wh66w9a2j9x3rvq0bzsk8xvv9im8kgmp"; }) qtbase.src ]; @@ -28,29 +30,39 @@ mkDerivation rec { sourceRoot = "source"; nativeBuildInputs = [ - pkgconfig + pkg-config qmake + deepin.setupHook ]; buildInputs = [ - qtx11extras + cairo libSM mtdev - cairo qtbase + qtwayland + qtx11extras ]; postPatch = '' - # The Qt5 platforms plugin is vendored in the package, however what's there is not always up-to-date with what's in nixpkgs. - # We simply copy the headers from qtbase's source tarball. - mkdir -p platformplugin/libqt5xcbqpa-dev/${qtbase.version} - cp -r ../qtbase-everywhere-src-${qtbase.version}/src/plugins/platforms/xcb/*.h platformplugin/libqt5xcbqpa-dev/${qtbase.version}/ + searchHardCodedPaths # debuging + + # The Qt5 platforms plugin is vendored in the package, however what is there is not always up-to-date with what is in nixpkgs. + # We simply link the headers from qtbase's source tarball. + ln -sr ../qtbase-everywhere-src-${qtbase.version}/src/plugins/platforms/xcb xcb/libqt5xcbqpa-dev/${qtbase.version} + + # Disable wayland for now: https://github.com/linuxdeepin/qt5platform-plugins/issues/47 + sed -i '/wayland/d' qt5platform-plugins.pro ''; qmakeFlags = [ "INSTALL_PATH=${placeholder "out"}/${qtbase.qtPluginPrefix}/platforms" ]; + postFixup = '' + searchHardCodedPaths -a $out # debuging + ''; + passthru.updateScript = deepin.updateScript { inherit pname version; src = (builtins.head srcs); }; meta = with stdenv.lib; { diff --git a/pkgs/desktops/deepin/setup-hook.sh b/pkgs/desktops/deepin/setup-hook.sh index ce1d7330a2221..6900e2561d901 100755 --- a/pkgs/desktops/deepin/setup-hook.sh +++ b/pkgs/desktops/deepin/setup-hook.sh @@ -18,13 +18,23 @@ searchHardCodedPaths() { local path=$1 - echo ----------- looking for command invocations in $path - grep --color=always -r -E '\<(ExecStart|Exec|startDetached|execute|exec\.(Command|LookPath))\>' $path || true + local display_path=$path + if [ -z "$display_path" ]; then + display_path=$(pwd) + fi + + echo ---------- looking for hard coded paths and command invocations in $display_path - echo ----------- looking for hard coded paths in $path - grep --color=always $binary -r -E '/(usr|bin|sbin|etc|var|opt)\>' $path || true + grep \ + --color=always \ + $binary \ + -r \ + -E '(/usr|/bin|/sbin|/etc|/var|/opt|(\<(ExecStart|Exec|startDetached|execute|exec\.(Command|LookPath))))\>' \ + $path \ + | sort \ + || true - echo ----------- done + echo ---------- done } fixPath() { diff --git a/pkgs/desktops/deepin/startdde/default.nix b/pkgs/desktops/deepin/startdde/default.nix index 75b36e85de3c9..7ead6772a8322 100644 --- a/pkgs/desktops/deepin/startdde/default.nix +++ b/pkgs/desktops/deepin/startdde/default.nix @@ -1,7 +1,7 @@ { stdenv , buildGoPackage , fetchFromGitHub -, pkgconfig +, pkg-config , alsaLib , coreutils , dde-api @@ -26,10 +26,11 @@ , kmod , libX11 , libXi +, libgudev +, libpulseaudio , libcgroup , pciutils , psmisc -, pulseaudio , systemd , xorg , wrapGAppsHook @@ -37,7 +38,7 @@ buildGoPackage rec { pname = "startdde"; - version = "5.0.1"; + version = "5.5.0.13"; goPackagePath = "pkg.deepin.io/dde/startdde"; @@ -45,13 +46,13 @@ buildGoPackage rec { owner = "linuxdeepin"; repo = pname; rev = version; - sha256 = "1xydmglydksy7hjlavf5pbfy0s0lndgavh8x3kg2mg7d36mbra43"; + sha256 = "05717npmgzhrylq5v6s5rpnj4n6lyryn15s1kygcmy834qg0j3jz"; }; goDeps = ./deps.nix; nativeBuildInputs = [ - pkgconfig + pkg-config jq wrapGAppsHook deepin.setupHook @@ -79,10 +80,11 @@ buildGoPackage rec { kmod libX11 libXi + libgudev + libpulseaudio libcgroup pciutils psmisc - pulseaudio systemd xorg.xdriinfo ]; @@ -93,31 +95,30 @@ buildGoPackage rec { # Commented lines below indicates a doubt about how to fix the hard coded path fixPath $out /etc/X11 Makefile + fixPath $out /etc/profile.d Makefile #fixPath ? /etc/xdg/autostop autostop/autostop.go fixPath ${coreutils} /bin/ls copyfile_test.go fixPath $out /usr/share/startdde/auto_launch.json launch_group.go - #fixPath ? /usr/bin/kwin_no_scale main.go # not found on deepin linux and archlinux + fixPath ${dde-kwin} /usr/bin/kwin_no_scale main.go fixPath $out /usr/share/startdde/memchecker.json memchecker/config.go - fixPath $out /usr/bin/startdde misc/00deepin-dde-env + fixPath $out /usr/bin/startdde misc/Xsession.d/00deepin-dde-env fixPath ${dde-file-manager} /usr/bin/dde-file-manager misc/auto_launch/chinese.json fixPath ${deepin-turbo} /usr/lib/deepin-turbo/booster-dtkwidget misc/auto_launch/chinese.json fixPath ${dde-daemon} /usr/lib/deepin-daemon/dde-session-daemon misc/auto_launch/chinese.json misc/auto_launch/default.json fixPath ${dde-dock} /usr/bin/dde-dock misc/auto_launch/chinese.json misc/auto_launch/default.json fixPath ${dde-file-manager} /usr/bin/dde-desktop misc/auto_launch/chinese.json misc/auto_launch/default.json - fixPath $out /usr/bin/startdde misc/deepin-session - #fixPath ? /usr/lib/lightdm/config-error-dialog.sh misc/deepin-session # provided by lightdm on deepin linux - #fixPath ? /usr/sbin/lightdm-session misc/deepin-session # provided by lightdm on deepin linux + fixPath $out /usr/sbin/deepin-fix-xauthority-perm misc/lightdm.conf fixPath ${dde-session-ui} /usr/bin/dde-lock session.go fixPath ${dde-session-ui} /usr/bin/dde-shutdown session.go fixPath ${dde-session-ui} /usr/lib/deepin-daemon/dde-osd session.go fixPath ${deepin-desktop-base} /etc/deepin-version session.go fixPath ${gnome3.gnome-keyring} /usr/bin/gnome-keyring-daemon session.go - fixPath ${pulseaudio} /usr/bin/pulseaudio sound_effect.go - #fixPath ? /usr/lib/UIAppSched.hooks startmanager.go # not found anything about this + #fixPath ? /usr/lib/UIAppSched.hooks startmanager.go # found nothing about this fixPath ${dde-session-ui} /usr/lib/deepin-daemon/dde-welcome utils.go fixPath ${dde-polkit-agent} /usr/lib/polkit-1-dde/dde-polkit-agent watchdog/dde_polkit_agent.go - #fixPath ? /var/log/Xorg.0.log wm/driver.go - #fixPath ? /etc/deepin-wm-switcher/config.json wm/switcher_config.go # not present on nixos, deepin linux and archlinux + + substituteInPlace session.go --replace '"kwin_no_scale"' '"${dde-kwin}/bin/kwin_no_scale"' + substituteInPlace watchdog/dde_kwin.go --replace '"kwin_no_scale"' '"${dde-kwin}/bin/kwin_no_scale"' substituteInPlace wm/driver.go --replace '/sbin/lsmod' "${kmod}/bin/lsmod" @@ -133,13 +134,18 @@ buildGoPackage rec { ''; buildPhase = '' + GOPATH="$GOPATH:${go-dbus-factory}/share/go" + GOPATH="$GOPATH:${go-gir-generator}/share/go" + GOPATH="$GOPATH:${go-lib}/share/go" + GOPATH="$GOPATH:${dde-api}/share/go" + make -C go/src/${goPackagePath} ''; installPhase = '' make install PREFIX="$out" -C go/src/${goPackagePath} rm -rf $out/share/lightdm # this is uselesss for NixOS - remove-references-to -t ${go} $out/sbin/* + remove-references-to -t ${go} $out/bin/* $out/sbin/* $out/lib/deepin-daemon/* ''; postFixup = '' diff --git a/pkgs/desktops/deepin/startdde/deps.nix b/pkgs/desktops/deepin/startdde/deps.nix index 8898b8c50fb76..5bf087480c838 100644 --- a/pkgs/desktops/deepin/startdde/deps.nix +++ b/pkgs/desktops/deepin/startdde/deps.nix @@ -9,13 +9,22 @@ sha256 = "18nyqv0ic35fs9fny8sj84c00vbxs8mnric6vr6yl42624fh5id6"; }; } + { + goPackagePath = "github.com/davecgh/go-spew"; + fetch = { + type = "git"; + url = "https://github.com/davecgh/go-spew"; + rev = "d8f796af33cc11cb798c1aaeb27a4ebc5099927d"; + sha256 = "19z27f306fpsrjdvkzd61w1bdazcdbczjyjck177g33iklinhpvx"; + }; + } { goPackagePath = "github.com/linuxdeepin/go-x11-client"; fetch = { type = "git"; url = "https://github.com/linuxdeepin/go-x11-client"; - rev = "b5b01565d224d5ccd5a4143d9099acceb23e182a"; - sha256 = "1lnffjp8bqy6f8caw6drg1js6hny5w7432riqchcrcd4q85d94rs"; + rev = "ace666086b736674685a56d457a1426eecf16782"; + sha256 = "1mnsgshg9y7c8qsqkhqassxf6j8xd1xp4frh92ihbqmsk7c4v1j2"; }; } { @@ -23,8 +32,17 @@ fetch = { type = "git"; url = "https://go.googlesource.com/net"; - rev = "daa7c04131f568e31c51927b359a2d197a357058"; - sha256 = "17gbfvb5iqyayzw0zd6q218zsbf7x74rflvn18wkxvsw95n1y54h"; + rev = "3edf25e44fccea9e11b919341e952fca722ef460"; + sha256 = "01iyxw6r5gb5lgdzs5sdkw4p31rjf2b14vvy45gryhjrcbg13r1a"; + }; + } + { + goPackagePath = "golang.org/x/xerrors"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/xerrors"; + rev = "5ec99f83aff198f5fbd629d6c8d8eb38a04218ca"; + sha256 = "1dbzc3gmf2haazpv7cgmv97rq40g2xzwbglc17vas8dwhgwgwrzb"; }; } ] diff --git a/pkgs/desktops/deepin/udisks2-qt5/default.nix b/pkgs/desktops/deepin/udisks2-qt5/default.nix index 0fcc2e9f9f71b..5221ff141fa67 100644 --- a/pkgs/desktops/deepin/udisks2-qt5/default.nix +++ b/pkgs/desktops/deepin/udisks2-qt5/default.nix @@ -8,13 +8,13 @@ mkDerivation rec { pname = "udisks2-qt5"; - version = "5.0.3"; + version = "5.0.4"; src = fetchFromGitHub { owner = "linuxdeepin"; repo = pname; rev = version; - sha256 = "0c87ks9glwhk4m2s7kf7mb43q011yi6l3qjq2ammmfqwl8xal69a"; + sha256 = "1d6qdcwp0n6f2ipn90n9m7biaims2kk1nljidw9h1myrqf3bfm4k"; }; nativeBuildInputs = [