summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorDaniel Thwaites <danthwaites30@btinternet.com>2022-04-22 17:43:25 +0100
committerGitHub <noreply@github.com>2022-04-22 12:43:25 -0400
commit4f9b8a07024c3397d33df3f26906839cd03f0297 (patch)
tree7a72fb7d1a1bfb8440a00d5a8ba7abfd6d6e7289 /pkgs/applications
parent114bfa7d5c4e618c1eafe79cc42975389307048e (diff)
downloadnixpkgs-4f9b8a07024c3397d33df3f26906839cd03f0297.tar
nixpkgs-4f9b8a07024c3397d33df3f26906839cd03f0297.tar.gz
nixpkgs-4f9b8a07024c3397d33df3f26906839cd03f0297.tar.bz2
nixpkgs-4f9b8a07024c3397d33df3f26906839cd03f0297.tar.lz
nixpkgs-4f9b8a07024c3397d33df3f26906839cd03f0297.tar.xz
nixpkgs-4f9b8a07024c3397d33df3f26906839cd03f0297.tar.zst
nixpkgs-4f9b8a07024c3397d33df3f26906839cd03f0297.zip
lib/strings: optimise hasInfix function (#168175)
* lib/strings: optimise hasInfix function

* lib/strings: optimise hasInfix further using regex

* rstudio: call hasInfix with a string

* lib/strings: remove let from hasInfix

Co-authored-by: pennae <82953136+pennae@users.noreply.github.com>

Co-authored-by: pennae <82953136+pennae@users.noreply.github.com>
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/editors/rstudio/default.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/applications/editors/rstudio/default.nix b/pkgs/applications/editors/rstudio/default.nix
index eada77eea84..8d4aa112cdb 100644
--- a/pkgs/applications/editors/rstudio/default.nix
+++ b/pkgs/applications/editors/rstudio/default.nix
@@ -154,7 +154,7 @@ in
     hunspellDictionaries = with lib; filter isDerivation (unique (attrValues hunspellDicts));
     # These dicts contain identically-named dict files, so we only keep the
     # -large versions in case of clashes
-    largeDicts = with lib; filter (d: hasInfix "-large-wordlist" d) hunspellDictionaries;
+    largeDicts = with lib; filter (d: hasInfix "-large-wordlist" d.name) hunspellDictionaries;
     otherDicts = with lib; filter
       (d: !(hasAttr "dictFileName" d &&
         elem d.dictFileName (map (d: d.dictFileName) largeDicts)))