From 36f46f769647b6391184a550a21bbbcc54dcba46 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Thu, 4 Mar 2021 14:11:52 +0200 Subject: [PATCH] Incorporate string escaping changes from nixpkgs #108086 --- lib.nix | 2 +- semver.nix | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib.nix b/lib.nix index 4626f7f..6af37b3 100644 --- a/lib.nix +++ b/lib.nix @@ -157,7 +157,7 @@ let missingBuildBackendError = "No build-system.build-backend section in pyproject.toml. " + "Add such a section as described in https://python-poetry.org/docs/pyproject/#poetry-and-pep-517"; requires = lib.attrByPath [ "build-system" "requires" ] (throw missingBuildBackendError) pyProject; - requiredPkgs = builtins.map (n: lib.elemAt (builtins.match "([^!=<>~\[]+).*" n) 0) requires; + requiredPkgs = builtins.map (n: lib.elemAt (builtins.match "([^!=<>~[]+).*" n) 0) requires; in builtins.map (drvAttr: pythonPackages.${drvAttr} or (throw "unsupported build system requirement ${drvAttr}")) requiredPkgs; diff --git a/semver.nix b/semver.nix index bf00139..0ef1d4c 100644 --- a/semver.nix +++ b/semver.nix @@ -3,7 +3,7 @@ let inherit (builtins) elemAt match; operators = let - matchWildCard = s: match "([^\*])(\.[\*])" s; + matchWildCard = s: match "([^*])(\\.[*])" s; mkComparison = ret: version: v: builtins.compareVersions version v == ret; mkIdxComparison = idx: version: v: let @@ -52,8 +52,8 @@ let # }; re = { - operators = "([=>