This commit is contained in:
parent
b8505790f2
commit
6cb7ce4a78
25
flake.nix
25
flake.nix
@ -122,30 +122,31 @@
|
||||
openssl
|
||||
];
|
||||
nativeBuildInputs = with prev; [
|
||||
pkg-config installShellFiles
|
||||
pkg-config
|
||||
installShellFiles
|
||||
];
|
||||
installCompletions = ''
|
||||
mkdir completions
|
||||
for shell in bash zsh fish; do
|
||||
$out/bin/sshcd completions --shell $shell > completions/$shell
|
||||
installShellCompletion --$shell completions/$shell
|
||||
done
|
||||
'';
|
||||
installCompletions = cmd: ''
|
||||
mkdir completions
|
||||
for shell in bash zsh fish; do
|
||||
$out/bin/${cmd} completions --shell $shell > completions/${cmd}.$shell
|
||||
installShellCompletion --cmd ${cmd} --$shell completions/${cmd}.$shell
|
||||
done
|
||||
'';
|
||||
in
|
||||
{
|
||||
"${pname}-server" =
|
||||
naersk-lib.buildPackage {
|
||||
name = "${pname}-server";
|
||||
inherit root buildInputs nativeBuildInputs;
|
||||
# postInstall = ''
|
||||
# ${installCompletions}
|
||||
# '';
|
||||
# postInstall = ''
|
||||
# ${installCompletions}
|
||||
# '';
|
||||
};
|
||||
"${pname}-client" =
|
||||
naersk-lib.buildPackage {
|
||||
name = "${pname}-client";
|
||||
postInstall = ''
|
||||
${installCompletions}
|
||||
${installCompletions "sshcd"}
|
||||
'';
|
||||
inherit root buildInputs nativeBuildInputs;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user