21 rustPlatform.buildRustPackage rec {
23 version = "2024.10.8";
25 src = fetchFromGitHub {
29 hash = "sha256-58y7jx7gmWlccezZXP5hSzrvnq8hlZ1QakF+FMgbwcc=";
32 cargoHash = "sha256-m2Eiqyh/rGgwRgRArs3fPWoqzi1EidZd5i66yi4SuFo=";
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}' \
54 --replace-fail '"git"' '"${lib.getExe git}"'
56 substituteInPlace ./src/git.rs \
57 --replace-fail '"git"' '"${lib.getExe git}"'
59 substituteInPlace ./src/env_diff.rs \
60 --replace-fail '"bash"' '"${lib.getExe bash}"'
62 substituteInPlace ./src/cli/direnv/exec.rs \
63 --replace-fail '"env"' '"${lib.getExe' coreutils "env"}"' \
64 --replace-fail 'cmd!("direnv"' 'cmd!("${lib.getExe direnv}"'
68 # last_modified will always be different in nix
69 "--skip=tera::tests::test_last_modified"
70 # requires https://github.com/rbenv/ruby-build
71 "--skip=plugins::core::ruby::tests::test_list_versions_matching"
74 cargoTestFlags = [ "--all-features" ];
75 # some tests access the same folders, don't test in parallel to avoid race conditions
76 dontUseCargoParallelTests = true;
79 installManPage ./man/man1/mise.1
81 substituteInPlace ./completions/{mise.bash,mise.fish,_mise} \
82 --replace-fail '-v usage' '-v ${lib.getExe usage}' \
83 --replace-fail 'usage complete-word' '${lib.getExe usage} complete-word'
85 installShellCompletion \
86 --bash ./completions/mise.bash \
87 --fish ./completions/mise.fish \
88 --zsh ./completions/_mise
92 updateScript = nix-update-script { };
93 tests.version = testers.testVersion { package = mise; };
97 homepage = "https://mise.jdx.dev";
98 description = "Front-end to your dev env";
99 changelog = "https://github.com/jdx/mise/releases/tag/v${version}";
100 license = lib.licenses.mit;
101 maintainers = with lib.maintainers; [ konradmalik ];
102 mainProgram = "mise";