1
0
Fork 0

stm32: add humpback fpga build dependencies

This commit is contained in:
Sebastien Bourdeauducq 2020-09-25 14:35:09 +08:00
parent fe728a7303
commit 657d3c1b27
1 changed files with 8 additions and 2 deletions

View File

@ -8,7 +8,7 @@ let
rustPlatform = pkgs.recurseIntoAttrs (pkgs.callPackage ./rustPlatform.nix {
inherit rustManifest;
});
buildStm32Firmware = { name, src, patchPhase ? "", checkPhase ? "" }:
buildStm32Firmware = { name, src, patchPhase ? "", extraBuildInputs ? [], checkPhase ? "" }:
let
cargoSha256Drv = pkgs.runCommand "${name}-cargosha256" { } ''cp "${src}/cargosha256.nix" $out'';
in
@ -20,7 +20,7 @@ let
cargoSha256 = (import cargoSha256Drv);
inherit patchPhase;
buildInputs = [ pkgs.llvm ];
buildInputs = [ pkgs.llvm ] ++ extraBuildInputs;
buildPhase = ''
export CARGO_HOME=$(mktemp -d cargo-home.XXX)
cargo build --release
@ -58,5 +58,11 @@ in
humpback-dds = buildStm32Firmware {
name = "humpback-dds";
src = <humpbackDdsSrc>;
extraBuildInputs = [
(pkgs.python3.withPackages(ps: [ (pkgs.callPackage "${<humpbackDdsSrc>}/nix/migen.nix" {}) ]))
pkgs.yosys
pkgs.nextpnr
pkgs.icestorm
];
};
}