diff options
author | Nick Cao <nickcao@nichi.co> | 2023-04-21 18:38:11 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-21 18:38:11 +0800 |
commit | 13ea5dc163f5abde5ed5954b75179eee7c420a8e (patch) | |
tree | 1c5477a4f8b816fdf1647ff78dc254949d506a90 /pkgs/desktops/deepin | |
parent | 0382203b4dff7d8611703e5440f96fb36d1f8ec2 (diff) | |
parent | 222cfb501b8731d5592a5dcc5f8b95290f53a222 (diff) |
Merge pull request #225377 from wineee/system-monitor
deepin.deepin-system-monitor: init at 5.9.32
Diffstat (limited to 'pkgs/desktops/deepin')
-rw-r--r-- | pkgs/desktops/deepin/apps/deepin-system-monitor/default.nix | 93 | ||||
-rw-r--r-- | pkgs/desktops/deepin/default.nix | 1 |
2 files changed, 94 insertions, 0 deletions
diff --git a/pkgs/desktops/deepin/apps/deepin-system-monitor/default.nix b/pkgs/desktops/deepin/apps/deepin-system-monitor/default.nix new file mode 100644 index 0000000000000..2a499b4288986 --- /dev/null +++ b/pkgs/desktops/deepin/apps/deepin-system-monitor/default.nix @@ -0,0 +1,93 @@ +{ stdenv +, lib +, fetchFromGitHub +, cmake +, pkg-config +, qttools +, deepin-gettext-tools +, wrapQtAppsHook +, dtkwidget +, qt5integration +, qt5platform-plugins +, qtbase +, qtsvg +, qtx11extras +, dde-qt-dbus-factory +, dde-dock +, gsettings-qt +, procps +, libpcap +, libnl +, util-linux +, systemd +, polkit +}: + +stdenv.mkDerivation rec { + pname = "deepin-system-monitor"; + version = "5.9.32"; + + src = fetchFromGitHub { + owner = "linuxdeepin"; + repo = pname; + rev = version; + sha256 = "sha256-jze5Pigk4edjojmpNNwaVVfcpk5Aed/S0y9YE0HdC0A"; + }; + + postPatch = '' + substituteInPlace deepin-system-monitor-main/process/process_controller.cpp \ + deepin-system-monitor-main/process/priority_controller.cpp \ + deepin-system-monitor-main/service/service_manager.cpp \ + deepin-system-monitor-main/translations/policy/com.deepin.pkexec.deepin-system-monitor.policy \ + --replace "/usr/bin/kill" "${util-linux}/bin/kill" \ + --replace "/usr/bin/renice" "${util-linux}/bin/renice" \ + --replace '/usr/bin/systemctl' '${lib.getBin systemd}/systemctl' + + substituteInPlace deepin-system-monitor-main/{service/service_manager.cpp,process/{priority_controller.cpp,process_controller.cpp}} \ + --replace "/usr/bin/pkexec" "${lib.getBin polkit}/bin/pkexec" + + for file in $(grep -rl "/usr") + do + substituteInPlace $file \ + --replace "/usr" "$out" + done + ''; + + nativeBuildInputs = [ + cmake + pkg-config + qttools + deepin-gettext-tools + wrapQtAppsHook + ]; + + buildInputs = [ + dtkwidget + qt5integration + qt5platform-plugins + qtbase + qtsvg + qtx11extras + dde-qt-dbus-factory + dde-dock + gsettings-qt + procps + libpcap + libnl + ]; + + cmakeFlags = [ + "-DVERSION=${version}" + "-DUSE_DEEPIN_WAYLAND=OFF" + ]; + + strictDeps = true; + + meta = with lib; { + description = "A more user-friendly system monitor"; + homepage = "https://github.com/linuxdeepin/deepin-system-monitor"; + license = licenses.gpl3Plus; + platforms = platforms.linux; + maintainers = teams.deepin.members; + }; +} diff --git a/pkgs/desktops/deepin/default.nix b/pkgs/desktops/deepin/default.nix index fd9af904d15ce..59f051a66215c 100644 --- a/pkgs/desktops/deepin/default.nix +++ b/pkgs/desktops/deepin/default.nix @@ -49,6 +49,7 @@ let deepin-music = callPackage ./apps/deepin-music { }; deepin-picker = callPackage ./apps/deepin-picker { }; deepin-shortcut-viewer = callPackage ./apps/deepin-shortcut-viewer { }; + deepin-system-monitor = callPackage ./apps/deepin-system-monitor { }; deepin-terminal = callPackage ./apps/deepin-terminal { }; deepin-reader = callPackage ./apps/deepin-reader { }; deepin-voice-note = callPackage ./apps/deepin-voice-note { }; |