blob: fb7db7343a0b457ac0ff7d6974e95c10277d19e9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
{ lib
, rustPlatform
, fetchFromGitHub
, installShellFiles
, pkg-config
, openssl
, stdenv
, CoreServices
, Libsystem
, SystemConfiguration
}:
rustPlatform.buildRustPackage rec {
pname = "rye";
version = "0.27.0";
src = fetchFromGitHub {
owner = "mitsuhiko";
repo = "rye";
rev = "refs/tags/${version}";
hash = "sha256-tqwjhA81UYCtZjz6X5tIZ91pDVPe4UU+sTKUIzmOHlM=";
};
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"dialoguer-0.10.4" = "sha256-WDqUKOu7Y0HElpPxf2T8EpzAY3mY8sSn9lf0V0jyAFc=";
"monotrail-utils-0.0.1" = "sha256-ydNdg6VI+Z5wXe2bEzRtavw0rsrcJkdsJ5DvXhbaDE4=";
};
};
env = {
OPENSSL_NO_VENDOR = 1;
};
nativeBuildInputs = [ installShellFiles pkg-config ];
buildInputs = [
openssl
]
++ lib.optionals stdenv.isDarwin [
CoreServices
Libsystem
SystemConfiguration
];
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)
'';
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"
];
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}";
license = licenses.mit;
maintainers = with maintainers; [ GaetanLepage ];
mainProgram = "rye";
};
}
|