mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 07:46:09 +01:00
bdf6f8528e
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 a31d98f312
,
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.
31 lines
1.1 KiB
Nix
31 lines
1.1 KiB
Nix
{
|
|
mkDerivation, substituteAll,
|
|
extra-cmake-modules, kdoctools,
|
|
kcompletion, kconfigwidgets, kcoreaddons, kdbusaddons, kdeclarative,
|
|
kdelibs4support, ki18n, kiconthemes, kinit, kio, kitemviews, knotifications,
|
|
kservice, kwallet, kwidgetsaddons, kwindowsystem, kxmlgui,
|
|
mobile-broadband-provider-info, modemmanager-qt, networkmanager-qt,
|
|
openconnect, openvpn, plasma-framework, qca-qt5, qtdeclarative, qttools, solid
|
|
}:
|
|
|
|
mkDerivation {
|
|
name = "plasma-nm";
|
|
nativeBuildInputs = [ extra-cmake-modules kdoctools qttools ];
|
|
buildInputs = [
|
|
kdeclarative kdelibs4support ki18n kio kwindowsystem plasma-framework
|
|
qtdeclarative kcompletion kconfigwidgets kcoreaddons kdbusaddons kiconthemes
|
|
kinit kitemviews knotifications kservice kwallet kwidgetsaddons kxmlgui
|
|
mobile-broadband-provider-info modemmanager-qt networkmanager-qt openconnect
|
|
qca-qt5 solid
|
|
];
|
|
patches = [
|
|
(substituteAll {
|
|
src = ./0001-mobile-broadband-provider-info-path.patch;
|
|
mobile_broadband_provider_info = mobile-broadband-provider-info;
|
|
})
|
|
(substituteAll {
|
|
src = ./0002-openvpn-binary-path.patch;
|
|
inherit openvpn;
|
|
})
|
|
];
|
|
}
|