mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 21:40:12 +00:00
47 lines
1.3 KiB
Nix
47 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage (finalAttrs: {
|
|
pname = "intermodal";
|
|
version = "0.1.16";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "casey";
|
|
repo = "intermodal";
|
|
rev = "v${finalAttrs.version}";
|
|
hash = "sha256-Ny/BOgLe2fWC9LQp2g2DvYAArdEujl6Rf1bvrAkSt2A=";
|
|
};
|
|
|
|
cargoHash = "sha256-WfiN0b6F4TcOHOu/deh86jIClnNKi+xhytjapqLwpaU=";
|
|
|
|
# include_hidden test tries to use `chflags` on darwin
|
|
checkFlags = lib.optionals stdenv.hostPlatform.isDarwin [
|
|
"--skip=subcommand::torrent::create::tests::include_hidden"
|
|
];
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
installShellCompletion --cmd imdl \
|
|
--bash <($out/bin/imdl completions bash) \
|
|
--fish <($out/bin/imdl completions fish) \
|
|
--zsh <($out/bin/imdl completions zsh)
|
|
'';
|
|
|
|
meta = {
|
|
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${finalAttrs.version}";
|
|
license = lib.licenses.cc0;
|
|
maintainers = with lib.maintainers; [
|
|
xrelkd
|
|
];
|
|
mainProgram = "imdl";
|
|
};
|
|
})
|