21 rustPlatform.buildRustPackage rec {
23 version = "2024.11.37";
25 src = fetchFromGitHub {
29 hash = "sha256-9hBBEuSjE1WMmjb+UfA2rroMwzb2cuZ3TzVRZfvwvvI=";
32 cargoHash = "sha256-PP1alyUmsqGjzUGnx1M8QYNBqELwil7NtH+W706PD2s=";
40 ++ lib.optionals stdenv.hostPlatform.isDarwin [
46 patchShebangs --build \
47 ./test/data/plugins/**/bin/* \
49 ./src/cli/generate/git_pre_commit.rs \
50 ./src/cli/generate/snapshots/*.snap
52 substituteInPlace ./src/test.rs \
53 --replace-fail '/usr/bin/env bash' '${lib.getExe bash}'
55 substituteInPlace ./src/git.rs \
56 --replace-fail '"git"' '"${lib.getExe git}"'
58 substituteInPlace ./src/env_diff.rs \
59 --replace-fail '"bash"' '"${lib.getExe bash}"'
61 substituteInPlace ./src/cli/direnv/exec.rs \
62 --replace-fail '"env"' '"${lib.getExe' coreutils "env"}"' \
63 --replace-fail 'cmd!("direnv"' 'cmd!("${lib.getExe direnv}"'
67 # last_modified will always be different in nix
68 "--skip=tera::tests::test_last_modified"
69 # requires https://github.com/rbenv/ruby-build
70 "--skip=plugins::core::ruby::tests::test_list_versions_matching"
73 cargoTestFlags = [ "--all-features" ];
74 # some tests access the same folders, don't test in parallel to avoid race conditions
75 dontUseCargoParallelTests = true;
78 installManPage ./man/man1/mise.1
80 substituteInPlace ./completions/{mise.bash,mise.fish,_mise} \
81 --replace-fail '-v usage' '-v ${lib.getExe usage}' \
82 --replace-fail 'usage complete-word' '${lib.getExe usage} complete-word'
84 installShellCompletion \
85 --bash ./completions/mise.bash \
86 --fish ./completions/mise.fish \
87 --zsh ./completions/_mise
91 updateScript = nix-update-script { };
92 tests.version = testers.testVersion { package = mise; };
96 homepage = "https://mise.jdx.dev";
97 description = "Front-end to your dev env";
98 changelog = "https://github.com/jdx/mise/releases/tag/v${version}";
99 license = lib.licenses.mit;
100 maintainers = with lib.maintainers; [ konradmalik ];
101 mainProgram = "mise";