Skip to content

Commit

Permalink
fixup!
Browse files Browse the repository at this point in the history
  • Loading branch information
johnyob authored and zcabter committed Sep 25, 2024
1 parent 6bf8f64 commit 0b06a17
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
12 changes: 11 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,17 @@
};

# Build octez release for this system
octez = octez-v21.packages.${system}.default;
octez = octez-v21.packages.${system}.default.overrideAttrs (old: {
patches =
(old.patches or [])
++ [
# The rust_deps library relies on `/bin/bash` (via the `dune` `bash` action)
# which is not available in Nix, so instead we rely on the `run` action with
# the shebang provided bash interpreter which Nix happily patches to use the
# Nix bash path for us.
./nix/patches/0001-fix-octez-rust-deps-for-nix.patch
];
});

clangNoArch =
if pkgs.stdenv.isDarwin
Expand Down
23 changes: 23 additions & 0 deletions nix/patches/0001-fix-octez-rust-deps-for-nix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
diff --git a/manifest/product_octez.ml b/manifest/product_octez.ml
index f4336a077a..5dc09607d9 100644
--- a/manifest/product_octez.ml
+++ b/manifest/product_octez.ml
@@ -522,7 +522,7 @@ let octez_rust_deps =
[S "source_tree"; S "../riscv"];
[S "source_tree"; S "../kernel_sdk"];
];
- [S "action"; [S "no-infer"; [S "bash"; S "./build.sh"]]];
+ [S "action"; [S "no-infer"; [S "system"; S "bash ./build.sh"]]];
];
]

diff --git a/src/rust_deps/dune b/src/rust_deps/dune
index de48dbfde8..41c538cdd2 100644
--- a/src/rust_deps/dune
+++ b/src/rust_deps/dune
@@ -22,4 +22,4 @@
(source_tree src)
(source_tree ../riscv)
(source_tree ../kernel_sdk))
- (action (no-infer (bash ./build.sh))))
+ (action (no-infer (system "bash ./build.sh"))))

0 comments on commit 0b06a17

Please sign in to comment.