2024-09-11 12:53:41 -05:00
|
|
|
{
|
|
|
|
installShellFiles,
|
|
|
|
rustPlatform,
|
|
|
|
fetchFromGitHub,
|
|
|
|
}:
|
2024-05-03 14:35:00 -05:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "bob";
|
2024-08-22 12:47:58 -05:00
|
|
|
version = "3.0.1";
|
2024-05-03 14:35:00 -05:00
|
|
|
|
2024-09-05 10:58:07 -05:00
|
|
|
buildInputs = [ installShellFiles ];
|
2024-05-03 14:35:00 -05:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "MordechaiHadad";
|
|
|
|
repo = "bob";
|
|
|
|
rev = "v${version}";
|
2024-08-22 12:47:58 -05:00
|
|
|
hash = "sha256-Op/NXWssylgAOb1BccSOz7JqXFranzAsGICFMF3o/K8=";
|
2024-05-03 14:35:00 -05:00
|
|
|
};
|
|
|
|
cargoLock.lockFile = "${src}/Cargo.lock";
|
2024-09-05 10:58:07 -05:00
|
|
|
|
|
|
|
postInstall = # bash
|
|
|
|
''
|
|
|
|
installShellCompletion --cmd bob \
|
|
|
|
--bash <($out/bin/bob complete bash) \
|
|
|
|
--zsh <($out/bin/bob complete zsh) \
|
|
|
|
--fish <($out/bin/bob complete fish)
|
|
|
|
'';
|
2024-05-03 14:35:00 -05:00
|
|
|
}
|