summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorYarny0 <41838844+Yarny0@users.noreply.github.com>2018-08-01 13:23:28 +0000
committerxeji <36407913+xeji@users.noreply.github.com>2018-08-01 15:23:28 +0200
commitbdf6f8528e9a8827d9d6b56a7bd8f8ff5f4298cc (patch)
tree22f6cf1573bc0048980649100cc161fc2655091c /pkgs
parent4f505d7267afc0c9164b8aa4fd61e0a2bef01195 (diff)
downloadnixpkgs-bdf6f8528e9a8827d9d6b56a7bd8f8ff5f4298cc.tar
nixpkgs-bdf6f8528e9a8827d9d6b56a7bd8f8ff5f4298cc.tar.gz
nixpkgs-bdf6f8528e9a8827d9d6b56a7bd8f8ff5f4298cc.tar.bz2
nixpkgs-bdf6f8528e9a8827d9d6b56a7bd8f8ff5f4298cc.tar.lz
nixpkgs-bdf6f8528e9a8827d9d6b56a7bd8f8ff5f4298cc.tar.xz
nixpkgs-bdf6f8528e9a8827d9d6b56a7bd8f8ff5f4298cc.tar.zst
nixpkgs-bdf6f8528e9a8827d9d6b56a7bd8f8ff5f4298cc.zip
plasma-nm: fix path to mobile broadband provider file (#44302)
When creating a new mobile broadband connection
with the plasma network manager connection editor,
it tries to find a file containing provider
information somewhere in /usr/share/... .
The build recipe contains a patch to fix the lookup path
such that it finds the file in the corresponding package,
probably added due to
https://github.com/NixOS/nixpkgs/issues/9389 .
The actual lookup path is injected into
the patch file with substituteAll.

With commit a31d98f3120e0f676303b7fc3e84424e6b325290 ,
the variable name used in subsituteAll changed from
mobile_broadband_provider_info to mobile-broadband-provider-info
(underscores in package names turned into dashes).
Apparently, substituteAll can't handle dashes in variable names.
Consequently, the variable name was no longer resolved.
plasma-nm failed to create new mobile broadband connections;
the connection creator silently exited and logged the error
> plasma-nm: Error opening providers file "@mobile-broadband-provider-info@/share/mobile-broadband-provider-info/serviceproviders.xml"

This commit keeps the dashes in package names, but it
restores the underscores in the variable used by substituteAll,
thereby ensuring the variable gets resolved properly.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/desktops/plasma-5/plasma-nm/0001-mobile-broadband-provider-info-path.patch2
-rw-r--r--pkgs/desktops/plasma-5/plasma-nm/default.nix2
2 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/desktops/plasma-5/plasma-nm/0001-mobile-broadband-provider-info-path.patch b/pkgs/desktops/plasma-5/plasma-nm/0001-mobile-broadband-provider-info-path.patch
index 75144d35222..79b5cfb437e 100644
--- a/pkgs/desktops/plasma-5/plasma-nm/0001-mobile-broadband-provider-info-path.patch
+++ b/pkgs/desktops/plasma-5/plasma-nm/0001-mobile-broadband-provider-info-path.patch
@@ -16,7 +16,7 @@ index 568cb34..98a5992 100644
  #include <KLocale>
  
 -const QString MobileProviders::ProvidersFile = "/usr/share/mobile-broadband-provider-info/serviceproviders.xml";
-+const QString MobileProviders::ProvidersFile = "@mobile-broadband-provider-info@/share/mobile-broadband-provider-info/serviceproviders.xml";
++const QString MobileProviders::ProvidersFile = "@mobile_broadband_provider_info@/share/mobile-broadband-provider-info/serviceproviders.xml";
  
  bool localeAwareCompare(const QString & one, const QString & two) {
      return one.localeAwareCompare(two) < 0;
diff --git a/pkgs/desktops/plasma-5/plasma-nm/default.nix b/pkgs/desktops/plasma-5/plasma-nm/default.nix
index 214dbd9cc04..8296d549782 100644
--- a/pkgs/desktops/plasma-5/plasma-nm/default.nix
+++ b/pkgs/desktops/plasma-5/plasma-nm/default.nix
@@ -21,7 +21,7 @@ mkDerivation {
   patches = [
     (substituteAll {
       src = ./0001-mobile-broadband-provider-info-path.patch;
-      inherit mobile-broadband-provider-info;
+      mobile_broadband_provider_info = mobile-broadband-provider-info;
     })
     (substituteAll {
       src = ./0002-openvpn-binary-path.patch;