pantheon.wingpanel-indicator-network: 2.2.4 -> 2.3.0

This commit is contained in:
Bobby Rong 2021-07-18 10:00:23 +08:00
parent 3b0bf70af4
commit e654bff699
No known key found for this signature in database
GPG Key ID: ED07364437C91161
2 changed files with 31 additions and 2 deletions

View File

@ -1,6 +1,8 @@
{ lib, stdenv
, fetchFromGitHub
, fetchpatch
, nix-update-script
, substituteAll
, pantheon
, pkg-config
, meson
@ -12,17 +14,18 @@
, libnma
, wingpanel
, libgee
, elementary-capnet-assist
}:
stdenv.mkDerivation rec {
pname = "wingpanel-indicator-network";
version = "2.2.4";
version = "2.3.0";
src = fetchFromGitHub {
owner = "elementary";
repo = pname;
rev = version;
sha256 = "sha256-wVHvHduUT55rIWRfRWg3Z3jL3FdzUJfiqFONRmpCR8k=";
sha256 = "0q5ad2sj0nmigrh1rykb2kvik3hzibzyafdvkkmjd6y92145lwl1";
};
passthru = {
@ -47,6 +50,19 @@ stdenv.mkDerivation rec {
wingpanel
];
patches = [
(substituteAll {
src = ./fix-paths.patch;
elementary_capnet_assist = elementary-capnet-assist;
})
# Upstream code not respecting our localedir
# https://github.com/elementary/wingpanel-indicator-network/pull/228
(fetchpatch {
url = "https://github.com/elementary/wingpanel-indicator-network/commit/eacc7d46a94a980005e87e38e6c943143a09692a.patch";
sha256 = "1svg07fqmplchp1ass0h8qkr3g24pkw8dcsnd54ddmvnjzwrzz0a";
})
];
meta = with lib; {
description = "Network Indicator for Wingpanel";
homepage = "https://github.com/elementary/wingpanel-indicator-network";

View File

@ -0,0 +1,13 @@
diff --git a/src/Indicator.vala b/src/Indicator.vala
index 83ce932a..f95ed142 100644
--- a/src/Indicator.vala
+++ b/src/Indicator.vala
@@ -67,7 +67,7 @@ public class Network.Indicator : Wingpanel.Indicator {
if (network_monitor.get_connectivity () == NetworkConnectivity.FULL || network_monitor.get_connectivity () == NetworkConnectivity.PORTAL) {
try {
- var appinfo = AppInfo.create_from_commandline ("io.elementary.capnet-assist", null, AppInfoCreateFlags.NONE);
+ var appinfo = AppInfo.create_from_commandline ("@elementary_capnet_assist@/bin/io.elementary.capnet-assist", null, AppInfoCreateFlags.NONE);
appinfo.launch (null, null);
} catch (Error e) {
warning ("%s\n", e.message);