biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / misc / intermodal / default.nix
blobb4b7d7807cb4fd17a219e9e0e83dc4760262de4d
1 { lib, stdenv, rustPlatform, fetchFromGitHub, installShellFiles }:
3 rustPlatform.buildRustPackage rec {
4   pname = "intermodal";
5   version = "0.1.14";
7   src = fetchFromGitHub {
8     owner = "casey";
9     repo = pname;
10     rev = "v${version}";
11     hash = "sha256-N3TumAwHcHDuVyY4t6FPNOO28D7xX5jheCTodfn71/Q=";
12   };
14   cargoHash = "sha256-k34psGOs6G+B/msmLSDHLNxnjO1yyE4OY6aQU8bt+is=";
16   # include_hidden test tries to use `chflags` on darwin
17   checkFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "--skip=subcommand::torrent::create::tests::include_hidden" ];
19   nativeBuildInputs = [ installShellFiles ];
21   postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
22     installShellCompletion --cmd imdl \
23       --bash <($out/bin/imdl completions bash) \
24       --fish <($out/bin/imdl completions fish) \
25       --zsh  <($out/bin/imdl completions zsh)
26   '';
28   meta = with lib; {
29     description = "User-friendly and featureful command-line BitTorrent metainfo utility";
30     homepage = "https://github.com/casey/intermodal";
31     changelog = "https://github.com/casey/intermodal/releases/tag/v${version}";
32     license = licenses.cc0;
33     maintainers = with maintainers; [ Br1ght0ne xrelkd ];
34     mainProgram = "imdl";
35   };