Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3062e9265724
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 8789ff3179af
Choose a head ref
  • 3 commits
  • 4 files changed
  • 1 contributor

Commits on Jun 28, 2019

  1. Copy the full SHA
    072a755 View commit details
  2. Copy the full SHA
    8c2bcb1 View commit details
  3. Merge pull request #63822 from worldofpeace/dde-control-center/init

     deepin.dde-control-center: init at 4.10.11
    worldofpeace authored Jun 28, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    8789ff3 View commit details
2 changes: 2 additions & 0 deletions nixos/modules/services/desktops/deepin/deepin.nix
Original file line number Diff line number Diff line change
@@ -33,6 +33,7 @@
environment.systemPackages = [
pkgs.deepin.dde-api
pkgs.deepin.dde-calendar
pkgs.deepin.dde-control-center
pkgs.deepin.dde-daemon
pkgs.deepin.dde-dock
pkgs.deepin.dde-launcher
@@ -46,6 +47,7 @@
services.dbus.packages = [
pkgs.deepin.dde-api
pkgs.deepin.dde-calendar
pkgs.deepin.dde-control-center
pkgs.deepin.dde-daemon
pkgs.deepin.dde-dock
pkgs.deepin.dde-launcher
112 changes: 112 additions & 0 deletions pkgs/desktops/deepin/dde-control-center/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
{ stdenv, fetchFromGitHub, pkgconfig, cmake, deepin, qttools, qtdeclarative,
networkmanager, qtsvg, qtx11extras, dtkcore, dtkwidget, geoip, gsettings-qt,
dde-network-utils, networkmanager-qt, xorg, mtdev, fontconfig, freetype, dde-api,
dde-daemon, qt5integration, deepin-desktop-base, deepin-desktop-schemas, dbus,
systemd, dde-qt-dbus-factory, qtmultimedia, qtbase, glib, gnome3, which,
substituteAll, wrapGAppsHook, tzdata
}:

stdenv.mkDerivation rec {
name = "${pname}-${version}";
pname = "dde-control-center";
version = "4.10.11";

src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "1ip8wjwf0n9q8xnqymzh8lz0j5gcnns976n291np6k5kdh2wqhr5";
};

nativeBuildInputs = [
cmake
deepin.setupHook
pkgconfig
wrapGAppsHook
];

buildInputs = [
dde-api
dde-daemon
dde-network-utils
dde-qt-dbus-factory
deepin-desktop-base
deepin-desktop-schemas
dtkcore
dtkwidget
fontconfig
freetype
geoip
glib
gnome3.networkmanager-l2tp
gnome3.networkmanager-openconnect
gnome3.networkmanager-openvpn
gnome3.networkmanager-vpnc
gsettings-qt
mtdev
networkmanager-qt
qt5integration
qtbase
qtdeclarative
qtmultimedia
qtsvg
qttools
qtx11extras
xorg.libX11
xorg.libXext
xorg.libXrandr
xorg.libxcb
];

cmakeFlags = [
"-DDISABLE_SYS_UPDATE=YES"
"-DDCC_DISABLE_GRUB=YES"
];

patches = [
(substituteAll {
src = ./fix-paths.patch;
nmcli = "${networkmanager}/bin/nmcli";
which = "${which}/bin/which";
# not packaged
# dman = "${deepin-manual}/bin/dman";
inherit tzdata;
# exclusive to deepin linux?
# allows to synchronize configuration files to cloud networks
# deepin_sync = "${deepin-sync}";
})
];

postPatch = ''
searchHardCodedPaths
patchShebangs translate_ts2desktop.sh
patchShebangs translate_generation.sh
patchShebangs translate_desktop2ts.sh
fixPath $out /usr dde-control-center-autostart.desktop \
com.deepin.dde.ControlCenter.service \
src/frame/widgets/utils.h
substituteInPlace dde-control-center.desktop \
--replace "dbus-send" "${dbus}/bin/dbus-send"
substituteInPlace com.deepin.controlcenter.addomain.policy \
--replace "/bin/systemctl" "${systemd}/bin/systemctl"
'';

postFixup = ''
# debuging
searchForUnresolvedDLL $out
searchHardCodedPaths $out
'';

passthru.updateScript = deepin.updateScript { inherit name; };

meta = with stdenv.lib; {
description = "Control panel of Deepin Desktop Environment";
homepage = https://github.com/linuxdeepin/dde-control-center;
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ romildo worldofpeace ];
};
}
65 changes: 65 additions & 0 deletions pkgs/desktops/deepin/dde-control-center/fix-paths.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
diff --git a/src/frame/frame.cpp b/src/frame/frame.cpp
index 90d06f8..7cdad04 100644
--- a/src/frame/frame.cpp
+++ b/src/frame/frame.cpp
@@ -375,7 +375,7 @@ void Frame::keyPressEvent(QKeyEvent *e)
#ifdef QT_DEBUG
case Qt::Key_Escape: qApp->quit(); break;
#endif
- case Qt::Key_F1: QProcess::startDetached("dman", QStringList("dde")); break;
+ case Qt::Key_F1: QProcess::startDetached("@dman@", QStringList("dde")); break;
default:;
}
}
diff --git a/src/frame/modules/datetime/timezone_dialog/timezone.cpp b/src/frame/modules/datetime/timezone_dialog/timezone.cpp
index 3dd4aad..5f1b363 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 {
namespace {

// Absolute path to zone.tab file.
-const char kZoneTabFile[] = "/usr/share/zoneinfo/zone.tab";
+const char kZoneTabFile[] = "@tzdata@/share/zoneinfo/zone.tab";

// 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()
qDebug() << Q_FUNC_INFO << args;

QProcess p;
- p.start("nmcli", args);
+ p.start("@nmcli@", args);
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()
qDebug() << args;

QProcess p;
- p.start("nmcli", args);
+ p.start("@nmcli@", args);
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<bool>(DCC_CONFIG_FILES, "CloudSync", "AllowCloudSync", false));
}
1 change: 1 addition & 0 deletions pkgs/desktops/deepin/default.nix
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ let
dbus-factory = callPackage ./dbus-factory { };
dde-api = callPackage ./dde-api { };
dde-calendar = callPackage ./dde-calendar { };
dde-control-center = callPackage ./dde-control-center { };
dde-daemon = callPackage ./dde-daemon { };
dde-dock = callPackage ./dde-dock { };
dde-file-manager = callPackage ./dde-file-manager { };