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