2023-04-29 16:46:19 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
2023-08-04 22:07:22 +00:00
|
|
|
, fetchFromGitHub
|
2023-10-09 19:29:22 +00:00
|
|
|
, installShellFiles
|
2023-04-29 16:46:19 +00:00
|
|
|
, pkg-config
|
2023-08-04 22:07:22 +00:00
|
|
|
, openssl
|
2023-04-29 16:46:19 +00:00
|
|
|
, stdenv
|
2024-01-02 11:29:13 +00:00
|
|
|
, CoreServices
|
2023-08-04 22:07:22 +00:00
|
|
|
, Libsystem
|
2023-04-29 16:46:19 +00:00
|
|
|
, SystemConfiguration
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "rye";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "0.16.0";
|
2023-04-29 16:46:19 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mitsuhiko";
|
2023-10-09 19:29:22 +00:00
|
|
|
repo = "rye";
|
2023-08-04 22:07:22 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-AIM61JEgWMDjeZVnOVamBiCXTT5LLEktwQpRtnflgcw=";
|
2023-04-29 16:46:19 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
|
|
|
"dialoguer-0.10.4" = "sha256-WDqUKOu7Y0HElpPxf2T8EpzAY3mY8sSn9lf0V0jyAFc=";
|
2023-08-04 22:07:22 +00:00
|
|
|
"monotrail-utils-0.0.1" = "sha256-4x5jnXczXnToU0QXpFalpG5A+7jeyaEBt8vBwxbFCKQ=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
env = {
|
|
|
|
OPENSSL_NO_VENDOR = 1;
|
|
|
|
};
|
2023-04-29 16:46:19 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles pkg-config ];
|
2023-04-29 16:46:19 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
]
|
2023-08-04 22:07:22 +00:00
|
|
|
++ lib.optionals stdenv.isDarwin [
|
2024-01-02 11:29:13 +00:00
|
|
|
CoreServices
|
2023-08-04 22:07:22 +00:00
|
|
|
Libsystem
|
|
|
|
SystemConfiguration
|
|
|
|
];
|
|
|
|
|
2023-10-09 19:29:22 +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-08-04 22:07:22 +00:00
|
|
|
checkFlags = [
|
|
|
|
"--skip=utils::test_is_inside_git_work_tree"
|
|
|
|
];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A tool to easily manage python dependencies and environments";
|
|
|
|
homepage = "https://github.com/mitsuhiko/rye";
|
2024-01-02 11:29:13 +00:00
|
|
|
changelog = "https://github.com/mitsuhiko/rye/releases/tag/${version}";
|
2023-04-29 16:46:19 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ GaetanLepage ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "rye";
|
2023-04-29 16:46:19 +00:00
|
|
|
};
|
|
|
|
}
|