2022-06-09 12:52:32 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2023-07-06 12:16:58 +00:00
|
|
|
, fetchFromGitHub
|
2022-06-09 12:52:32 +00:00
|
|
|
, rustPlatform
|
|
|
|
, pkg-config
|
|
|
|
, openssl
|
|
|
|
, installShellFiles
|
|
|
|
, Security
|
|
|
|
, curl
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "sheldon";
|
2024-08-28 05:04:09 +00:00
|
|
|
version = "0.8.0";
|
2022-06-09 12:52:32 +00:00
|
|
|
|
2023-07-06 12:16:58 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rossmacarthur";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2024-08-28 05:04:09 +00:00
|
|
|
hash = "sha256-eyfIPO1yXvb+0SeAx+F6/z5iDUA2GfWOiElfjn6abJM=";
|
2022-06-09 12:52:32 +00:00
|
|
|
};
|
|
|
|
|
2024-08-28 05:04:09 +00:00
|
|
|
cargoHash = "sha256-+yTX1wUfVVjsM42X0QliL+0xbzTPheADZibPh/5Czh8=";
|
2022-06-09 12:52:32 +00:00
|
|
|
|
2022-10-06 16:38:53 +00:00
|
|
|
buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security curl ];
|
2022-06-09 12:52:32 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles pkg-config ];
|
|
|
|
|
|
|
|
# Needs network connection
|
|
|
|
checkFlags = [
|
2023-07-06 12:16:58 +00:00
|
|
|
"--skip lock::plugin::tests::external_plugin_lock_git_with_matches"
|
|
|
|
"--skip lock::plugin::tests::external_plugin_lock_git_with_matches_not_each"
|
|
|
|
"--skip lock::plugin::tests::external_plugin_lock_git_with_uses"
|
|
|
|
"--skip lock::plugin::tests::external_plugin_lock_remote"
|
|
|
|
"--skip lock::source::git::tests::git_checkout_resolve_branch"
|
|
|
|
"--skip lock::source::git::tests::git_checkout_resolve_rev"
|
|
|
|
"--skip lock::source::git::tests::git_checkout_resolve_tag"
|
|
|
|
"--skip lock::source::git::tests::lock_git_and_reinstall"
|
|
|
|
"--skip lock::source::git::tests::lock_git_https_with_checkout"
|
|
|
|
"--skip lock::source::local::tests::lock_local"
|
|
|
|
"--skip lock::source::remote::tests::lock_remote_and_reinstall"
|
|
|
|
"--skip lock::source::tests::lock_with_git"
|
|
|
|
"--skip lock::source::tests::lock_with_remote"
|
2022-06-09 12:52:32 +00:00
|
|
|
"--skip lock::tests::locked_config_clean"
|
2023-07-06 12:16:58 +00:00
|
|
|
"--skip directories_default"
|
|
|
|
"--skip directories_old"
|
|
|
|
"--skip directories_xdg_from_env"
|
|
|
|
"--skip lock_and_source_github"
|
|
|
|
"--skip lock_and_source_hooks"
|
|
|
|
"--skip lock_and_source_inline"
|
|
|
|
"--skip lock_and_source_profiles"
|
2022-06-09 12:52:32 +00:00
|
|
|
];
|
|
|
|
|
2024-07-10 11:52:28 +00:00
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
2022-06-09 12:52:32 +00:00
|
|
|
installShellCompletion --cmd sheldon \
|
|
|
|
--bash <($out/bin/sheldon completions --shell bash) \
|
|
|
|
--zsh <($out/bin/sheldon completions --shell zsh)
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Fast and configurable shell plugin manager";
|
|
|
|
homepage = "https://github.com/rossmacarthur/sheldon";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ seqizz ];
|
2024-09-03 02:10:40 +00:00
|
|
|
platforms = platforms.unix;
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "sheldon";
|
2022-06-09 12:52:32 +00:00
|
|
|
};
|
|
|
|
}
|