Merge pull request #86 from isabelroses/fix-replacevars
refactor: substituteAll -> replaceVars
This commit is contained in:
+6
-3
@@ -132,13 +132,16 @@ let
|
||||
'' + (lib.optionalString (cfg.extraEnv != {})
|
||||
(lib.concatLines (lib.mapAttrsToList (name: value: "export ${name}=${lib.escapeShellArg value}") cfg.extraEnv)))
|
||||
+ (builtins.readFile ./brew.tail.sh));
|
||||
in pkgs.substituteAll {
|
||||
in pkgs.replaceVarsWith {
|
||||
name = "brew";
|
||||
src = template;
|
||||
isExecutable = true;
|
||||
|
||||
inherit runtimePath;
|
||||
inherit (prefix) prefix library;
|
||||
replacements = {
|
||||
out = placeholder "out";
|
||||
inherit runtimePath;
|
||||
inherit (prefix) prefix library;
|
||||
};
|
||||
};
|
||||
|
||||
setupHomebrew = let
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{ lib
|
||||
, pkgs
|
||||
, substituteAll
|
||||
, replaceVarsWith
|
||||
, runtimeShell
|
||||
, coreutils
|
||||
, findutils
|
||||
@@ -13,13 +13,15 @@
|
||||
}:
|
||||
|
||||
let
|
||||
script = substituteAll {
|
||||
script = replaceVarsWith {
|
||||
name = "nuke-homebrew-repository";
|
||||
src = ./nuke-homebrew-repository.sh.in;
|
||||
isExecutable = true;
|
||||
|
||||
inherit runtimeShell;
|
||||
path = lib.makeBinPath [ coreutils findutils gnugrep gnused gitMinimal ];
|
||||
replacements = {
|
||||
inherit runtimeShell;
|
||||
path = lib.makeBinPath [ coreutils findutils gnugrep gnused gitMinimal ];
|
||||
};
|
||||
};
|
||||
|
||||
brew-src = inputs.brew-src or (throw "The tests can only be run with flakes");
|
||||
|
||||
Reference in New Issue
Block a user