1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-03 07:31:03 +01:00

treewide: substituteAll -> replaceVars/substitute

substituteAll is now officially deprecated.
This commit is contained in:
K900 2025-04-24 12:41:47 +03:00 committed by Robert Helgesson
parent d31710fb2c
commit abfad3d295
12 changed files with 56 additions and 43 deletions

View file

@ -101,9 +101,7 @@ in
storeDir = lib.escapeShellArg builtins.storeDir;
check = pkgs.substituteAll {
src = ./files/check-link-targets.sh;
check = pkgs.replaceVars ./files/check-link-targets.sh {
inherit (config.lib.bash) initHomeManagerLib;
inherit forcedPaths storeDir;
};

View file

@ -8,17 +8,16 @@
}:
let
cfg = config.programs.command-not-found;
commandNotFound = pkgs.substituteAll {
name = "command-not-found";
dir = "bin";
src = ./command-not-found.pl;
isExecutable = true;
cnfScript = pkgs.replaceVars ./command-not-found.pl {
inherit (cfg) dbPath;
perl = pkgs.perl.withPackages (p: [
p.DBDSQLite
p.StringShellQuote
]);
};
commandNotFound = pkgs.runCommand "command-not-found" { } ''
install -Dm555 ${cnfScript} $out/bin/command-not-found
'';
shInit = commandNotFoundHandlerName: ''
# This function is called whenever a command is not found.