Remove hasInfix usage for compatibility with older nixpkgs

This commit is contained in:
Robert Hensing 2019-09-05 17:10:52 +02:00
parent 4064e43631
commit bbfa047848

View file

@ -18,7 +18,7 @@
#
{ lib ? import <nixpkgs/lib>, ... }:
let
inherit (lib.strings) splitString hasPrefix removePrefix removeSuffix hasInfix replaceStrings;
inherit (lib.strings) splitString hasPrefix removePrefix removeSuffix replaceStrings;
inherit (lib.lists) foldl' head tail;
parseIniText = text:
@ -33,7 +33,7 @@ let
then r // {
section = removePrefix "[" (removeSuffix "]" line);
}
else if hasInfix "=" line then
else if builtins.match ".*=.*" line != null then
let
s = splitString "=" line;
s0 = head s;