summary refs log tree commit diff
path: root/pkgs/tools/misc/sheldon/default.nix
blob: 8f2c458fe1d6f55e6c41164a826e7b0ac9946eab (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{ lib
, stdenv
, fetchCrate
, rustPlatform
, pkg-config
, openssl
, installShellFiles
, Security
, curl
}:

rustPlatform.buildRustPackage rec {
  pname = "sheldon";
  version = "0.6.6";

  src = fetchCrate {
    inherit pname version;
    sha256 = "sha256-NjNBTjSaFoh+DAJfcM4G3+Meih1czLxs/RMmMwrXqD4=";
  };

  cargoSha256 = "sha256-uRcaHuDLQm6OYqt01kLbW/mfZnL4HaDabaweaw1EOfs=";

  buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security curl ];
  nativeBuildInputs = [ installShellFiles pkg-config ];

  # Needs network connection
  checkFlags = [
    "--skip cli::tests::raw_opt_help"
    "--skip lock::tests::external_plugin_lock_git_with_matches"
    "--skip lock::tests::external_plugin_lock_git_with_matches_error"
    "--skip lock::tests::external_plugin_lock_git_with_matches_not_each"
    "--skip lock::tests::external_plugin_lock_git_with_uses"
    "--skip lock::tests::external_plugin_lock_remote"
    "--skip lock::tests::git_checkout_resolve_branch"
    "--skip lock::tests::git_checkout_resolve_rev"
    "--skip lock::tests::git_checkout_resolve_tag"
    "--skip lock::tests::locked_config_clean"
    "--skip lock::tests::source_lock_git_and_reinstall"
    "--skip lock::tests::source_lock_git_git_with_checkout"
    "--skip lock::tests::source_lock_git_https_with_checkout"
    "--skip lock::tests::source_lock_local"
    "--skip lock::tests::source_lock_remote_and_reinstall"
    "--skip lock::tests::source_lock_with_git"
    "--skip lock::tests::source_lock_with_remote"
  ];

  postInstall = ''
    installShellCompletion --cmd sheldon \
      --bash <($out/bin/sheldon completions --shell bash) \
      --zsh <($out/bin/sheldon completions --shell zsh)
  '';

  meta = with lib; {
    description = "A fast and configurable shell plugin manager";
    homepage = "https://github.com/rossmacarthur/sheldon";
    license = with licenses; [ mit ];
    maintainers = with maintainers; [ seqizz ];
    platforms = platforms.linux;
  };
}