treewide: remove global with lib; statements in pkgs/development

This commit is contained in:
Shawn8901
2023-01-26 18:31:02 +01:00
parent aedc95590c
commit a59dda942c
84 changed files with 391 additions and 524 deletions
@@ -3,8 +3,6 @@
, makePythonHook
, makeWrapper }:
with lib;
makePythonHook {
deps = makeWrapper;
substitutions.sitePackages = python.sitePackages;
@@ -19,7 +17,7 @@ makePythonHook {
mkStringSkipper = labelNum: quote: let
label = "q${toString labelNum}";
isSingle = elem quote [ "\"" "'\"'\"'" ];
isSingle = lib.elem quote [ "\"" "'\"'\"'" ];
endQuote = if isSingle then "[^\\\\]${quote}" else quote;
in ''
/^[a-z]?${quote}/ {
@@ -45,8 +43,8 @@ makePythonHook {
:r
/\\$|,$/{N;br}
/__future__|^ |^ *(#.*)?$/{n;br}
${concatImapStrings mkStringSkipper quoteVariants}
/^[^# ]/i ${replaceStrings ["\n"] [";"] preamble}
${lib.concatImapStrings mkStringSkipper quoteVariants}
/^[^# ]/i ${lib.replaceStrings ["\n"] [";"] preamble}
}
'';
} ./wrap.sh