nixpkgs/pkgs/tools/misc/intermodal/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
1.2 KiB
Nix
Raw Normal View History

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";
version = "0.1.13";
2020-05-01 14:50:04 +00:00
src = fetchFromGitHub {
owner = "casey";
repo = pname;
rev = "v${version}";
hash = "sha256-hKMO7ZicXSYESXWKmDC2ILD996KoYDXS5HJExyXMdX4=";
2020-05-01 14:50:04 +00:00
};
cargoHash = "sha256-7vtUMG6mxAHKnbouyTsaUf1myJssxYoqAIOjc6m86Fo=";
2020-05-01 14:50:04 +00:00
# include_hidden test tries to use `chflags` on darwin
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 ];
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)
'';
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";
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 ];
mainProgram = "imdl";
2020-05-01 14:50:04 +00:00
};
}