intermodal: install shell completions
This commit is contained in:
parent
c939301d72
commit
d0b037d332
|
@ -1,4 +1,4 @@
|
||||||
{ lib, stdenv, rustPlatform, fetchFromGitHub }:
|
{ lib, stdenv, rustPlatform, fetchFromGitHub, installShellFiles }:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "intermodal";
|
pname = "intermodal";
|
||||||
|
@ -8,14 +8,23 @@ rustPlatform.buildRustPackage rec {
|
||||||
owner = "casey";
|
owner = "casey";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "0mn0wm3bihn7ffqk0p79mb1hik54dbhc9diq1wh9ylpld2iqmz68";
|
hash = "sha256-yPyKo2j0Up8gDzi2xOBqpMwIw6rpXDCxc8fCuEblwFY=";
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoSha256 = "1bvs23rb25qdwbrygzq11p8cvck5lxjp9llvs1cjdh0qzr65jwla";
|
cargoHash = "sha256-inJZTP4YwCZZ0JvSdGWnZbLN0A0B/+fz4g0XsfIQeq8=";
|
||||||
|
|
||||||
# include_hidden test tries to use `chflags` on darwin
|
# include_hidden test tries to use `chflags` on darwin
|
||||||
checkFlagsArray = lib.optionals stdenv.isDarwin [ "--skip=subcommand::torrent::create::tests::include_hidden" ];
|
checkFlagsArray = lib.optionals stdenv.isDarwin [ "--skip=subcommand::torrent::create::tests::include_hidden" ];
|
||||||
|
|
||||||
|
nativeBuildInputs = [ installShellFiles ];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
installShellCompletion --cmd imdl \
|
||||||
|
--bash <($out/bin/imdl completions bash) \
|
||||||
|
--fish <($out/bin/imdl completions fish) \
|
||||||
|
--zsh <($out/bin/imdl completions zsh)
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "User-friendly and featureful command-line BitTorrent metainfo utility";
|
description = "User-friendly and featureful command-line BitTorrent metainfo utility";
|
||||||
homepage = "https://github.com/casey/intermodal";
|
homepage = "https://github.com/casey/intermodal";
|
||||||
|
|
Loading…
Reference in a new issue