From 3df9ae26ee786f4af6ba6d18bfa760fa9aac1e77 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Fri, 8 Jan 2021 23:01:47 -0500 Subject: Fix stack overflow in nix There is a bug in nixpkgs where lib.strings.splitString overflows on long lines. builtins.split performs better, but needs the extra filter for some reason. https://github.com/NixOS/nixpkgs/issues/68951 --- Biz/Bild/Rules.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Biz/Bild/Rules.nix b/Biz/Bild/Rules.nix index fcdf025..51fcb14 100644 --- a/Biz/Bild/Rules.nix +++ b/Biz/Bild/Rules.nix @@ -10,7 +10,10 @@ let root = builtins.getEnv "BIZ_ROOT"; # general functions to put in a lib - lines = s: lib.strings.splitString "\n" s; + lines = s: lib.pipe s [ + (builtins.split "\n") + (builtins.filter (x: builtins.typeOf x == "string")) + ]; removeNull = ls: builtins.filter (x: x != null) ls; selectAttrs = deps: packageSet: -- cgit v1.2.3