b/t/toolchain-bundle: patch bison to use env for path resolving
Change-Id: I266b30d442aa62f32ffbb6ccbe869012a91bcf0a
Reviewed-on: https://review.monogon.dev/c/monogon/+/4420
Tested-by: Jenkins CI
Reviewed-by: Lorenz Brun <lorenz@monogon.tech>
diff --git a/third_party/nix/pkgs/bison/default.nix b/third_party/nix/pkgs/bison/default.nix
new file mode 100644
index 0000000..8b2245e
--- /dev/null
+++ b/third_party/nix/pkgs/bison/default.nix
@@ -0,0 +1,10 @@
+{ pkgs }: with pkgs;
+if (!stdenv.hostPlatform.isStatic) then bison else
+bison.overrideAttrs (old: {
+ # Check overrided file for more informations
+ postPatch = ''
+ cp ${./yacc.in} src/yacc.in
+ '';
+
+ env.BISON = "${builtins.placeholder "out"}/bin/bison";
+})