anvil-editor: init at 0.4
[NixPkgs.git] / pkgs / tools / misc / sheldon / default.nix
blob3d5e2e84a56617c1b3e0d6c1e749361d971cfc68
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , rustPlatform
5 , pkg-config
6 , openssl
7 , installShellFiles
8 , Security
9 , curl
12 rustPlatform.buildRustPackage rec {
13   pname = "sheldon";
14   version = "0.8.0";
16   src = fetchFromGitHub {
17     owner = "rossmacarthur";
18     repo = pname;
19     rev = version;
20     hash = "sha256-eyfIPO1yXvb+0SeAx+F6/z5iDUA2GfWOiElfjn6abJM=";
21   };
23   cargoHash = "sha256-+yTX1wUfVVjsM42X0QliL+0xbzTPheADZibPh/5Czh8=";
25   buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security curl ];
26   nativeBuildInputs = [ installShellFiles pkg-config ];
28   # Needs network connection
29   checkFlags = [
30     "--skip lock::plugin::tests::external_plugin_lock_git_with_matches"
31     "--skip lock::plugin::tests::external_plugin_lock_git_with_matches_not_each"
32     "--skip lock::plugin::tests::external_plugin_lock_git_with_uses"
33     "--skip lock::plugin::tests::external_plugin_lock_remote"
34     "--skip lock::source::git::tests::git_checkout_resolve_branch"
35     "--skip lock::source::git::tests::git_checkout_resolve_rev"
36     "--skip lock::source::git::tests::git_checkout_resolve_tag"
37     "--skip lock::source::git::tests::lock_git_and_reinstall"
38     "--skip lock::source::git::tests::lock_git_https_with_checkout"
39     "--skip lock::source::local::tests::lock_local"
40     "--skip lock::source::remote::tests::lock_remote_and_reinstall"
41     "--skip lock::source::tests::lock_with_git"
42     "--skip lock::source::tests::lock_with_remote"
43     "--skip lock::tests::locked_config_clean"
44     "--skip directories_default"
45     "--skip directories_old"
46     "--skip directories_xdg_from_env"
47     "--skip lock_and_source_github"
48     "--skip lock_and_source_hooks"
49     "--skip lock_and_source_inline"
50     "--skip lock_and_source_profiles"
51   ];
53   postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
54     installShellCompletion --cmd sheldon \
55       --bash <($out/bin/sheldon completions --shell bash) \
56       --zsh <($out/bin/sheldon completions --shell zsh)
57   '';
59   meta = with lib; {
60     description = "Fast and configurable shell plugin manager";
61     homepage = "https://github.com/rossmacarthur/sheldon";
62     license = with licenses; [ mit ];
63     maintainers = with maintainers; [ seqizz ];
64     platforms = platforms.unix;
65     mainProgram = "sheldon";
66   };