From 23b5de5cd3d1562b0dc39620afb6a583ee5b1ea7 Mon Sep 17 00:00:00 2001 From: Artturin Date: Fri, 4 Apr 2025 17:21:59 +0300 Subject: [PATCH] flake: Fix bluespec bsc binary Nixpkgs pr incoming --- flake.nix | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 6f8f727..1536e8c 100644 --- a/flake.nix +++ b/flake.nix @@ -34,7 +34,27 @@ # Versions can be checked with # `nix eval --json ".#riscv-bluespec-classic.nativeBuildInputs" | nix-shell -p jq --run jq` nativeBuildInputs = [ - bluespec + ( + (bluespec.override { + makeWrapper = prev.makeBinaryWrapper; + withDocs = false; + texliveFull = null; + asciidoctor = null; + }).overrideAttrs + { + doCheck = false; + + postFixup = '' + # https://github.com/B-Lang-org/bsc/blob/65e3a87a17f6b9cf38cbb7b6ad7a4473f025c098/src/comp/bsc.hs#L1839 + wrapProgram $out/bin/core/bsc \ + --prefix PATH : ${ + prev.lib.makeBinPath ( + if stdenv.hostPlatform.isDarwin then [ prev.cctools ] else [ prev.targetPackages.stdenv.cc ] + ) + } + ''; + } + ) nextpnr openfpgaloader trellis