2023-02-12 10:56:39 +00:00
|
|
|
{ lib, stdenv, rustPlatform, fetchFromGitHub, installShellFiles }:
|
2020-05-01 14:50:04 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "intermodal";
|
2023-08-10 04:20:00 +00:00
|
|
|
version = "0.1.13";
|
2020-05-01 14:50:04 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "casey";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-08-10 04:20:00 +00:00
|
|
|
hash = "sha256-hKMO7ZicXSYESXWKmDC2ILD996KoYDXS5HJExyXMdX4=";
|
2020-05-01 14:50:04 +00:00
|
|
|
};
|
|
|
|
|
2023-08-10 04:20:00 +00:00
|
|
|
cargoHash = "sha256-7vtUMG6mxAHKnbouyTsaUf1myJssxYoqAIOjc6m86Fo=";
|
2020-05-01 14:50:04 +00:00
|
|
|
|
|
|
|
# include_hidden test tries to use `chflags` on darwin
|
2024-08-18 10:52:34 +00:00
|
|
|
checkFlags = lib.optionals stdenv.isDarwin [ "--skip=subcommand::torrent::create::tests::include_hidden" ];
|
2020-05-01 14:50:04 +00:00
|
|
|
|
2023-02-12 10:56:39 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2024-07-10 11:52:28 +00:00
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
2023-02-12 10:56:39 +00:00
|
|
|
installShellCompletion --cmd imdl \
|
|
|
|
--bash <($out/bin/imdl completions bash) \
|
|
|
|
--fish <($out/bin/imdl completions fish) \
|
|
|
|
--zsh <($out/bin/imdl completions zsh)
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-05-01 14:50:04 +00:00
|
|
|
description = "User-friendly and featureful command-line BitTorrent metainfo utility";
|
|
|
|
homepage = "https://github.com/casey/intermodal";
|
2023-08-10 04:20:00 +00:00
|
|
|
changelog = "https://github.com/casey/intermodal/releases/tag/v${version}";
|
2020-05-01 14:50:04 +00:00
|
|
|
license = licenses.cc0;
|
2023-02-12 10:45:51 +00:00
|
|
|
maintainers = with maintainers; [ Br1ght0ne xrelkd ];
|
2022-04-01 19:34:55 +00:00
|
|
|
mainProgram = "imdl";
|
2020-05-01 14:50:04 +00:00
|
|
|
};
|
|
|
|
}
|