2023-02-16 17:41:37 +00:00
|
|
|
{ lib, stdenv, rustPlatform, fetchFromGitHub, installShellFiles }:
|
2020-05-03 17:38:23 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "intermodal";
|
2023-08-22 20:05:09 +00:00
|
|
|
version = "0.1.13";
|
2020-05-03 17:38:23 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "casey";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-08-22 20:05:09 +00:00
|
|
|
hash = "sha256-hKMO7ZicXSYESXWKmDC2ILD996KoYDXS5HJExyXMdX4=";
|
2020-05-03 17:38:23 +00:00
|
|
|
};
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
cargoHash = "sha256-7vtUMG6mxAHKnbouyTsaUf1myJssxYoqAIOjc6m86Fo=";
|
2020-05-03 17:38:23 +00:00
|
|
|
|
|
|
|
# include_hidden test tries to use `chflags` on darwin
|
2021-01-15 22:18:51 +00:00
|
|
|
checkFlagsArray = lib.optionals stdenv.isDarwin [ "--skip=subcommand::torrent::create::tests::include_hidden" ];
|
2020-05-03 17:38:23 +00:00
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd imdl \
|
|
|
|
--bash <($out/bin/imdl completions bash) \
|
|
|
|
--fish <($out/bin/imdl completions fish) \
|
|
|
|
--zsh <($out/bin/imdl completions zsh)
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-05-03 17:38:23 +00:00
|
|
|
description = "User-friendly and featureful command-line BitTorrent metainfo utility";
|
|
|
|
homepage = "https://github.com/casey/intermodal";
|
2023-08-22 20:05:09 +00:00
|
|
|
changelog = "https://github.com/casey/intermodal/releases/tag/v${version}";
|
2020-05-03 17:38:23 +00:00
|
|
|
license = licenses.cc0;
|
2023-02-16 17:41:37 +00:00
|
|
|
maintainers = with maintainers; [ Br1ght0ne xrelkd ];
|
2022-04-27 09:35:20 +00:00
|
|
|
mainProgram = "imdl";
|
2020-05-03 17:38:23 +00:00
|
|
|
};
|
|
|
|
}
|