mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-12 01:59:37 +08:00
treewide: substituteAll -> replaceVars/substitute
substituteAll is now officially deprecated.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user