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";
|
2020-10-18 14:29:57 +00:00
|
|
|
version = "0.1.12";
|
2020-05-01 14:50:04 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "casey";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-02-12 10:56:39 +00:00
|
|
|
hash = "sha256-yPyKo2j0Up8gDzi2xOBqpMwIw6rpXDCxc8fCuEblwFY=";
|
2020-05-01 14:50:04 +00:00
|
|
|
};
|
|
|
|
|
2023-02-12 10:56:39 +00:00
|
|
|
cargoHash = "sha256-inJZTP4YwCZZ0JvSdGWnZbLN0A0B/+fz4g0XsfIQeq8=";
|
2020-05-01 14:50:04 +00:00
|
|
|
|
|
|
|
# include_hidden test tries to use `chflags` on darwin
|
2021-01-15 09:19:50 +00:00
|
|
|
checkFlagsArray = 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 ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
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";
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|