nixpkgs/pkgs/development/tools/rye/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

84 lines
2.1 KiB
Nix
Raw Normal View History

2023-04-23 16:24:42 +00:00
{ lib
, rustPlatform
2023-07-18 06:44:03 +00:00
, fetchFromGitHub
2023-10-09 11:36:38 +00:00
, installShellFiles
2023-04-23 16:24:42 +00:00
, pkg-config
2023-07-18 06:44:03 +00:00
, openssl
2023-04-23 16:24:42 +00:00
, stdenv
, CoreServices
2023-07-18 06:44:03 +00:00
, Libsystem
2023-04-23 16:24:42 +00:00
, SystemConfiguration
}:
rustPlatform.buildRustPackage rec {
pname = "rye";
version = "0.27.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}";
hash = "sha256-tqwjhA81UYCtZjz6X5tIZ91pDVPe4UU+sTKUIzmOHlM=";
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=";
"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
2023-10-09 11:36:38 +00:00
nativeBuildInputs = [ installShellFiles pkg-config ];
2023-04-23 16:24:42 +00:00
buildInputs = [
openssl
]
2023-07-18 06:44:03 +00:00
++ lib.optionals stdenv.isDarwin [
CoreServices
2023-07-18 06:44:03 +00:00
Libsystem
SystemConfiguration
];
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"
# The following require internet access to fetch a python binary
"--skip=test_add_and_sync_no_auto_sync"
"--skip=test_add_autosync"
"--skip=test_add_flask"
"--skip=test_add_from_find_links"
"--skip=test_basic_tool_behavior"
"--skip=test_config_empty"
"--skip=test_config_get_set_multiple"
"--skip=test_config_incompatible_format_and_show_path"
"--skip=test_config_show_path"
"--skip=test_empty_sync"
"--skip=test_fetch"
"--skip=test_init_default"
"--skip=test_init_lib"
"--skip=test_init_script"
"--skip=test_lint_and_format"
2023-07-18 06:44:03 +00:00
];
2023-06-05 19:08:50 +00:00
2023-04-23 16:24:42 +00:00
meta = with lib; {
description = "A tool to easily manage python dependencies and environments";
homepage = "https://github.com/mitsuhiko/rye";
changelog = "https://github.com/mitsuhiko/rye/releases/tag/${version}";
2023-04-23 16:24:42 +00:00
license = licenses.mit;
maintainers = with maintainers; [ GaetanLepage ];
mainProgram = "rye";
2023-04-23 16:24:42 +00:00
};
}