Repository navigation
Expand file tree
/
Copy pathdefault.nix
More file actions
97 lines (88 loc) · 4.55 KB
/
Copy pathdefault.nix
File metadata and controls
97 lines (88 loc) · 4.55 KB
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
{ pkgs, lib, rustPlatform, coreutils, bash, direnv, openssl, git }:
rustPlatform.buildRustPackage {
pname = "mise";
version = "2026.10.5";
src = lib.cleanSource ./.;
cargoLock = {
lockFile = ./Cargo.lock;
};
nativeBuildInputs = with pkgs; [
cmakeMinimal
clang
llvmPackages.libclang
pkg-config
rustPlatform.bindgenHook
];
nativeCheckInputs = with pkgs; [
git
];
buildInputs = with pkgs; [
bash
coreutils
direnv
gawk
git
gnused
openssl
];
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib";
# tera-contrib's now() resolves its timezone by name (TimeZone::get("UTC")),
# which requires a tzdb. The build sandbox provides none, so tests calling
# now() fail with "Unknown timezone: UTC".
TZDIR = "${pkgs.tzdata}/share/zoneinfo";
prePatch = ''
substituteInPlace ./src/test.rs ./test/data/plugins/**/bin/* \
--replace '/usr/bin/env bash' '${bash}/bin/bash'
substituteInPlace ./src/fake_asdf.rs ./src/cli/generate/git_pre_commit.rs ./src/cli/generate/snapshots/*.snap \
--replace '/bin/sh' '${bash}/bin/sh'
substituteInPlace ./src/env_diff.rs \
--replace '"bash"' '"${bash}/bin/bash"'
substituteInPlace ./src/cli/direnv/exec.rs \
--replace '"env"' '"${coreutils}/bin/env"' \
--replace 'cmd!("direnv"' 'cmd!("${direnv}/bin/direnv"'
substituteInPlace ./src/git.rs ./src/test.rs \
--replace '"git"' '"${git}/bin/git"'
'';
# Skip tests that require network, host tools unavailable in the sandbox,
# or .git folder excluded by Nix.
checkPhase = ''
RUST_BACKTRACE=full cargo test --all-features -- \
--skip agecrypt::plugin_tests::plugin_protocol_roundtrip_and_software_recovery \
--skip backend::spm::tests::test_inline_install_command_uses_install_environment \
--skip cli::plugins::ls::tests::test_plugin_list_urls \
--skip tera::tests::test_last_modified \
--skip system::defaults::tests::test_status_missing_keys_are_unset \
--skip system::defaults::tests::test_nested_value_round_trip \
--skip plugins::core::ruby::tests::test_list_versions_matching \
--skip cmd::tests::test_direct_inline_supervision \
--skip cmd::tests::test_macos_sandbox_preserves_piped_stdin \
--skip inline_command::unix::tests::native_argv0_and_logical_pwd \
--skip sandbox::macos::tests::test_allow_read_executes_shell_without_reading_siblings \
--skip sandbox::macos::tests::test_deny_process_at_runtime \
--skip sandbox::macos::tests::test_private_metadata_does_not_expose_directory_contents \
--skip system::packages::brew::cask::tests::adopts_only_an_identical_existing_app \
--skip system::packages::brew::cask::tests::auto_updates_reads_string_versions_from_xml_and_binary_plists \
--skip system::packages::brew::cask::tests::ditto_into_rejects_preplanted_symlink_destination \
--skip system::packages::brew::cask::tests::ditto_into_stays_bound_after_directory_replacement \
--skip system::packages::brew::cask::tests::ensure_trusted_appdir_creates_missing_tail \
--skip system::packages::brew::cask::tests::ensure_trusted_appdir_rejects_symlinked_tail \
--skip system::packages::brew::cask::tests::ensure_trusted_appdir_stays_bound_after_same_uid_replacement \
--skip system::packages::brew::cask::tests::ensure_trusted_appdir_walks_from_unreplaceable_root \
--skip system::packages::brew::cask::tests::failed_app_activation_preserves_caskroom_copy \
--skip system::packages::brew::cask::tests::installer_mutations_are_included_in_durable_symlink_sources \
--skip system::packages::brew::cask::tests::self_updating_cask_adopts_a_different_existing_app \
--skip system::packages::brew::cask::tests::staged_artifact_closure_merges_a_parent_after_its_child \
--skip system::packages::brew::cask::tests::staged_symlink_source_accepts_canonical_stage_spelling \
--skip system::packages::brew::cask::tests::staged_symlink_source_copies_reachable_internal_links \
--skip system::packages::brew::cask::tests::staged_symlink_sources_become_caskroom_owned \
--skip system::packages::brew::cask::tests::structured_copy_restores_external_target_without_status_tracking \
--skip system::packages::brew::cask::tests::structured_copy_rollback_removes_target_with_created_parent \
--skip mise_binary_services_aube_node_gyp_bootstrap_trampoline
'';
meta = with lib; {
description = "Dev tools, env vars, and tasks in one CLI";
homepage = "https://github.com/jdx/mise";
license = licenses.mit;
mainProgram = "mise";
};
}