diff --git a/pkgs/default.nix b/pkgs/default.nix index 9af4ce42..cdab1257 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -112,6 +112,8 @@ let # jackett doesn't allow customization of the bind address: this will probably always be here. jackett = callPackage ./patched/jackett { inherit (unpatched) jackett; }; + modemmanager = callPackage ./patched/modemmanager { inherit (unpatched) modemmanager; }; + phoc = callPackage ./patched/phoc { inherit (unpatched) phoc; }; diff --git a/pkgs/patched/modemmanager/default.nix b/pkgs/patched/modemmanager/default.nix new file mode 100644 index 00000000..f0eab19a --- /dev/null +++ b/pkgs/patched/modemmanager/default.nix @@ -0,0 +1,6 @@ +{ modemmanager }: modemmanager.overrideAttrs (upstream: { + patches = (upstream.patches or []) ++ [ + # don't go into the "fail" state just because we can't figure out if the SIM is unlocked + ./missing-sim-not-fatal.patch + ]; +}) diff --git a/pkgs/patched/modemmanager/missing-sim-not-fatal.patch b/pkgs/patched/modemmanager/missing-sim-not-fatal.patch new file mode 100644 index 00000000..1b332b15 --- /dev/null +++ b/pkgs/patched/modemmanager/missing-sim-not-fatal.patch @@ -0,0 +1,41 @@ +commit bf4b81671e9bd073efc95a2fa4d4c05c3174104f +Author: Colin +Date: 2023-08-17 07:50:32 +0000 + + don't enter failed state due to missing sim + +diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c +index 911c139d..c6550ccd 100644 +--- a/src/mm-iface-modem.c ++++ b/src/mm-iface-modem.c +@@ -3773,7 +3773,8 @@ internal_load_unlock_required_ready (MMIfaceModem *self, + } else { + mm_obj_dbg (self, "couldn't check if unlock required: %s", error->message); + g_error_free (error); +- ctx->lock = MM_MODEM_LOCK_UNKNOWN; ++ mm_obj_info(self, "faking unlock state (Colin patch)"); ++ ctx->lock = MM_MODEM_LOCK_NONE; + } + } + +@@ -5177,13 +5178,13 @@ modem_update_lock_info_ready (MMIfaceModem *self, + /* NOTE: we already propagated the lock state, no need to do it again */ + mm_iface_modem_update_lock_info_finish (self, res, &ctx->fatal_error); + if (ctx->fatal_error) { +- g_prefix_error (&ctx->fatal_error, +- "Couldn't check unlock status: "); +- /* Jump to the last step */ +- ctx->step = INITIALIZATION_STEP_LAST; +- } else +- /* Go on to next step */ +- ctx->step++; ++ mm_obj_info (self, "ignoring 'couldnt check unlock status' error (sane patch)"); ++ g_error_free (ctx->fatal_error); ++ ctx->fatal_error = NULL; ++ } ++ ++ /* Go on to next step */ ++ ctx->step++; + + interface_initialization_step (task); + }