1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-06 00:51:04 +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

@ -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.