mozilla binary packages: use lib.hasPrefix

This commit is contained in:
Ben Siraphob
2026-09-18 07:52:51 -07:00
parent 0945b71d22
commit 63bb1ff4fd
2 changed files with 2 additions and 6 deletions

View File

@@ -44,9 +44,7 @@ let
arch = mozillaPlatforms.${stdenv.hostPlatform.system};
isPrefixOf = prefix: string: builtins.substring 0 (builtins.stringLength prefix) string == prefix;
sourceMatches = locale: source: (isPrefixOf source.locale locale) && source.arch == arch;
sourceMatches = locale: source: (lib.hasPrefix source.locale locale) && source.arch == arch;
policies = {
DisableAppUpdate = true;

View File

@@ -46,9 +46,7 @@ let
arch = mozillaPlatforms.${stdenv.hostPlatform.system} or throwSystem;
isPrefixOf = prefix: string: builtins.substring 0 (builtins.stringLength prefix) string == prefix;
sourceMatches = locale: source: (isPrefixOf source.locale locale) && source.arch == arch;
sourceMatches = locale: source: (lib.hasPrefix source.locale locale) && source.arch == arch;
defaultSource = lib.findFirst (sourceMatches "en-US") { } sources;