Skip to content

Commit

Permalink
Fixes nix flake
Browse files Browse the repository at this point in the history
  • Loading branch information
laozc committed Jun 18, 2024
1 parent e0e4107 commit 2f979fa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
13 changes: 8 additions & 5 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, lib, stdenv, fetchFromGitHub, rustPlatform, coreutils, bash, direnv, openssl }:
{ pkgs, lib, stdenv, fetchFromGitHub, rustPlatform, coreutils, bash, direnv, openssl, git }:

rustPlatform.buildRustPackage {
pname = "mise";
Expand All @@ -24,15 +24,18 @@ rustPlatform.buildRustPackage {
prePatch = ''
substituteInPlace ./test/data/plugins/**/bin/* \
--replace '#!/usr/bin/env bash' '#!${bash}/bin/bash'
substituteInPlace ./src/fake_asdf.rs ./src/cli/reshim.rs \
--replace '#!/bin/sh' '#!${bash}/bin/sh'
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 ./test/cwd/.mise/tasks/filetask \
--replace '#!/usr/bin/env 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 \
--replace '"git"' '"${git}/bin/git"'
substituteInPlace ./src/test.rs \
--replace '"git"' '"${git}/bin/git"' \
--replace '/usr/bin/env bash' '${bash}/bin/bash'
'';

# Skip the test_plugin_list_urls as it uses the .git folder, which
Expand Down
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2f979fa

Please sign in to comment.