Skip to content

Commit 1294b25

Browse files
authored
Merge pull request #1536 from Nadrieril/fix-release
Fix macos release
2 parents bf39fad + cc4f7fa commit 1294b25

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

‎flake.nix‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
fullMirSysroots = pkgs.callPackage ./nix/full-mir-sysroots.nix { inherit rustToolchain; };
4545
charon-unwrapped = pkgs.callPackage ./nix/charon.nix {
46-
inherit craneLib;
46+
inherit craneLib rustToolchain;
4747
charonCommit = self.rev or (lib.removeSuffix "-dirty" (self.dirtyRev or "unknown"));
4848
minirustSrc = minirust-src;
4949
miriSysroots = fullMirSysroots;

‎nix/charon.nix‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
, lib
55
, minirustSrc
66
, miriSysroots ? null
7+
, rustToolchain
8+
, stdenv
79
, zlib
810
}:
911

@@ -56,6 +58,10 @@ craneLib.buildPackage (
5658
CHARON_TOOLCHAIN_IS_IN_PATH=1 IN_CI=1 cargo test --profile release --locked
5759
# We also re-generate the generated AST files.
5860
mkdir -p src/bin/generate-asts/generated
61+
${lib.optionalString stdenv.isDarwin ''
62+
# Cargo sets this for tests; the direct invocation needs it too.
63+
export DYLD_FALLBACK_LIBRARY_PATH="${rustToolchain}/lib''${DYLD_FALLBACK_LIBRARY_PATH:+:$DYLD_FALLBACK_LIBRARY_PATH}"
64+
''}
5965
CHARON_TOOLCHAIN_IS_IN_PATH=1 IN_CI=1 target/release/generate-asts
6066
6167
# Export the generated files to later check if they match the committed files.

0 commit comments

Comments
 (0)