Loading pkgs/kde/plasma/plasma-nm/default.nix +5 −2 Original line number Diff line number Diff line { lib, mkKdeDerivation, replaceVars, pkg-config, Loading @@ -7,13 +8,15 @@ mobile-broadband-provider-info, openconnect, openvpn, strongswan, }: mkKdeDerivation { pname = "plasma-nm"; patches = [ (replaceVars ./0002-openvpn-binary-path.patch { inherit openvpn; (replaceVars ./hardcode-paths.patch { openvpn = lib.getExe openvpn; ipsec = lib.getExe' strongswan "ipsec"; }) ]; Loading pkgs/kde/plasma/plasma-nm/0002-openvpn-binary-path.patch→pkgs/kde/plasma/plasma-nm/hardcode-paths.patch +26 −0 Original line number Diff line number Diff line diff --git a/vpn/l2tp/l2tpipsecwidget.cpp b/vpn/l2tp/l2tpipsecwidget.cpp index bcc92dfd6..6708128fa 100644 --- a/vpn/l2tp/l2tpipsecwidget.cpp +++ b/vpn/l2tp/l2tpipsecwidget.cpp @@ -387,7 +387,7 @@ bool L2tpIpsecWidget::hasIpsecDaemon() return true; } - QString ipsecBinary = QStandardPaths::findExecutable(QStringLiteral("ipsec"), QStringList() << QStringLiteral("/sbin") << QStringLiteral("/usr/sbin")); + QString ipsecBinary = "@ipsec@"; // On some Linux distributions, ipsec executable has been renamed strongswan if (ipsecBinary.isEmpty()) { diff --git a/vpn/openvpn/openvpnadvancedwidget.cpp b/vpn/openvpn/openvpnadvancedwidget.cpp index 2f11ba1d..310f11b4 100644 index a1c2c553d..111f6138c 100644 --- a/vpn/openvpn/openvpnadvancedwidget.cpp +++ b/vpn/openvpn/openvpnadvancedwidget.cpp @@ -75,7 +75,7 @@ OpenVpnAdvancedWidget::OpenVpnAdvancedWidget(const NetworkManager::VpnSetting::P connect(m_ui->cmbProxyType, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &OpenVpnAdvancedWidget::proxyTypeChanged); @@ -102,7 +102,7 @@ OpenVpnAdvancedWidget::OpenVpnAdvancedWidget(const NetworkManager::VpnSetting::P }); // start openVPN process and get its cipher list - const QString openVpnBinary = QStandardPaths::findExecutable("openvpn", QStringList{"/sbin", "/usr/sbin"}); + const QString openVpnBinary = "@openvpn@/bin/openvpn"; + const QString openVpnBinary = "@openvpn@"; const QStringList ciphersArgs(QLatin1String("--show-ciphers")); const QStringList versionArgs(QLatin1String("--version")); Loading
pkgs/kde/plasma/plasma-nm/default.nix +5 −2 Original line number Diff line number Diff line { lib, mkKdeDerivation, replaceVars, pkg-config, Loading @@ -7,13 +8,15 @@ mobile-broadband-provider-info, openconnect, openvpn, strongswan, }: mkKdeDerivation { pname = "plasma-nm"; patches = [ (replaceVars ./0002-openvpn-binary-path.patch { inherit openvpn; (replaceVars ./hardcode-paths.patch { openvpn = lib.getExe openvpn; ipsec = lib.getExe' strongswan "ipsec"; }) ]; Loading
pkgs/kde/plasma/plasma-nm/0002-openvpn-binary-path.patch→pkgs/kde/plasma/plasma-nm/hardcode-paths.patch +26 −0 Original line number Diff line number Diff line diff --git a/vpn/l2tp/l2tpipsecwidget.cpp b/vpn/l2tp/l2tpipsecwidget.cpp index bcc92dfd6..6708128fa 100644 --- a/vpn/l2tp/l2tpipsecwidget.cpp +++ b/vpn/l2tp/l2tpipsecwidget.cpp @@ -387,7 +387,7 @@ bool L2tpIpsecWidget::hasIpsecDaemon() return true; } - QString ipsecBinary = QStandardPaths::findExecutable(QStringLiteral("ipsec"), QStringList() << QStringLiteral("/sbin") << QStringLiteral("/usr/sbin")); + QString ipsecBinary = "@ipsec@"; // On some Linux distributions, ipsec executable has been renamed strongswan if (ipsecBinary.isEmpty()) { diff --git a/vpn/openvpn/openvpnadvancedwidget.cpp b/vpn/openvpn/openvpnadvancedwidget.cpp index 2f11ba1d..310f11b4 100644 index a1c2c553d..111f6138c 100644 --- a/vpn/openvpn/openvpnadvancedwidget.cpp +++ b/vpn/openvpn/openvpnadvancedwidget.cpp @@ -75,7 +75,7 @@ OpenVpnAdvancedWidget::OpenVpnAdvancedWidget(const NetworkManager::VpnSetting::P connect(m_ui->cmbProxyType, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &OpenVpnAdvancedWidget::proxyTypeChanged); @@ -102,7 +102,7 @@ OpenVpnAdvancedWidget::OpenVpnAdvancedWidget(const NetworkManager::VpnSetting::P }); // start openVPN process and get its cipher list - const QString openVpnBinary = QStandardPaths::findExecutable("openvpn", QStringList{"/sbin", "/usr/sbin"}); + const QString openVpnBinary = "@openvpn@/bin/openvpn"; + const QString openVpnBinary = "@openvpn@"; const QStringList ciphersArgs(QLatin1String("--show-ciphers")); const QStringList versionArgs(QLatin1String("--version"));