2024-08-21 06:12:07 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
rustPlatform,
|
|
|
|
fetchFromGitHub,
|
|
|
|
|
|
|
|
# nativeBuildInputs
|
|
|
|
installShellFiles,
|
|
|
|
pkg-config,
|
|
|
|
|
|
|
|
# buildInputs
|
|
|
|
openssl,
|
|
|
|
stdenv,
|
|
|
|
darwin,
|
|
|
|
|
|
|
|
# passthru
|
|
|
|
nix-update-script,
|
|
|
|
testers,
|
|
|
|
rye,
|
2023-04-23 16:24:42 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "rye";
|
2024-09-25 15:18:35 +00:00
|
|
|
version = "0.40.0";
|
2023-04-23 16:24:42 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mitsuhiko";
|
2023-08-27 15:04:09 +00:00
|
|
|
repo = "rye";
|
2023-07-18 06:44:03 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-09-25 15:18:35 +00:00
|
|
|
hash = "sha256-EfmHCjDwpnxkKCxX1clFp1HxzlnJYkWscLMPonhOXOA=";
|
2023-04-23 16:24:42 +00:00
|
|
|
};
|
|
|
|
|
2023-06-05 19:08:50 +00:00
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
|
|
|
"dialoguer-0.10.4" = "sha256-WDqUKOu7Y0HElpPxf2T8EpzAY3mY8sSn9lf0V0jyAFc=";
|
2024-02-13 19:40:20 +00:00
|
|
|
"monotrail-utils-0.0.1" = "sha256-ydNdg6VI+Z5wXe2bEzRtavw0rsrcJkdsJ5DvXhbaDE4=";
|
2023-06-05 19:08:50 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
env = {
|
|
|
|
OPENSSL_NO_VENDOR = 1;
|
|
|
|
};
|
2023-04-23 16:24:42 +00:00
|
|
|
|
2024-08-21 06:12:07 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
installShellFiles
|
|
|
|
pkg-config
|
|
|
|
];
|
2023-04-23 16:24:42 +00:00
|
|
|
|
2024-08-21 06:12:07 +00:00
|
|
|
buildInputs =
|
|
|
|
[ openssl ]
|
2024-09-24 15:50:49 +00:00
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin (
|
2024-08-21 06:12:07 +00:00
|
|
|
with darwin.apple_sdk;
|
|
|
|
[
|
|
|
|
frameworks.CoreServices
|
|
|
|
frameworks.SystemConfiguration
|
|
|
|
Libsystem
|
|
|
|
]
|
|
|
|
);
|
2023-07-18 06:44:03 +00:00
|
|
|
|
2023-10-09 11:36:38 +00:00
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
|
|
installShellCompletion --cmd rye \
|
|
|
|
--bash <($out/bin/rye self completion -s bash) \
|
|
|
|
--fish <($out/bin/rye self completion -s fish) \
|
|
|
|
--zsh <($out/bin/rye self completion -s zsh)
|
|
|
|
'';
|
|
|
|
|
2023-07-18 06:44:03 +00:00
|
|
|
checkFlags = [
|
|
|
|
"--skip=utils::test_is_inside_git_work_tree"
|
2024-02-20 14:05:16 +00:00
|
|
|
|
|
|
|
# The following require internet access to fetch a python binary
|
|
|
|
"--skip=test_add_and_sync_no_auto_sync"
|
|
|
|
"--skip=test_add_autosync"
|
2024-08-02 06:07:29 +00:00
|
|
|
"--skip=test_add_dev"
|
2024-03-07 12:37:10 +00:00
|
|
|
"--skip=test_add_explicit_version_or_url"
|
2024-02-20 14:05:16 +00:00
|
|
|
"--skip=test_add_flask"
|
|
|
|
"--skip=test_add_from_find_links"
|
2024-03-07 12:37:10 +00:00
|
|
|
"--skip=test_autosync_remember"
|
2024-04-24 19:06:49 +00:00
|
|
|
"--skip=test_basic_list"
|
2024-08-02 06:07:29 +00:00
|
|
|
"--skip=test_basic_script"
|
2024-02-20 14:05:16 +00:00
|
|
|
"--skip=test_basic_tool_behavior"
|
|
|
|
"--skip=test_config_empty"
|
|
|
|
"--skip=test_config_get_set_multiple"
|
|
|
|
"--skip=test_config_incompatible_format_and_show_path"
|
2024-03-07 12:37:10 +00:00
|
|
|
"--skip=test_config_save_missing_folder"
|
2024-02-20 14:05:16 +00:00
|
|
|
"--skip=test_config_show_path"
|
2024-03-19 22:13:44 +00:00
|
|
|
"--skip=test_dotenv"
|
2024-02-20 14:05:16 +00:00
|
|
|
"--skip=test_empty_sync"
|
2024-09-25 15:18:35 +00:00
|
|
|
"--skip=test_exclude_hashes"
|
2024-02-20 14:05:16 +00:00
|
|
|
"--skip=test_fetch"
|
|
|
|
"--skip=test_init_default"
|
|
|
|
"--skip=test_init_lib"
|
|
|
|
"--skip=test_init_script"
|
|
|
|
"--skip=test_lint_and_format"
|
2024-09-25 15:18:35 +00:00
|
|
|
"--skip=test_list_never_overwrite"
|
2024-04-24 19:06:49 +00:00
|
|
|
"--skip=test_list_not_rye_managed"
|
2024-03-22 10:56:23 +00:00
|
|
|
"--skip=test_publish_outside_project"
|
2024-03-07 12:37:10 +00:00
|
|
|
"--skip=test_version"
|
2023-07-18 06:44:03 +00:00
|
|
|
];
|
2023-06-05 19:08:50 +00:00
|
|
|
|
2024-06-24 13:24:52 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script { };
|
|
|
|
tests.version = testers.testVersion { package = rye; };
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = {
|
2023-04-23 16:24:42 +00:00
|
|
|
description = "Tool to easily manage python dependencies and environments";
|
|
|
|
homepage = "https://github.com/mitsuhiko/rye";
|
2023-12-16 23:32:52 +00:00
|
|
|
changelog = "https://github.com/mitsuhiko/rye/releases/tag/${version}";
|
2024-06-24 13:24:52 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ GaetanLepage ];
|
2023-12-16 23:32:52 +00:00
|
|
|
mainProgram = "rye";
|
2023-04-23 16:24:42 +00:00
|
|
|
};
|
|
|
|
}
|