Skip to content

Commit

Permalink
Fixes nix flake (jdx#2305)
Browse files Browse the repository at this point in the history
  • Loading branch information
laozc authored and triarius committed Sep 18, 2024
1 parent 9e76610 commit a719b6d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
14 changes: 7 additions & 7 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 @@ -22,17 +22,17 @@ rustPlatform.buildRustPackage {
] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration ];

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/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 ./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 ./src/test.rs \
--replace '"git"' '"${git}/bin/git"'
'';

# 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 a719b6d

Please sign in to comment.