nix: allow overriding artiq-board build command

This commit is contained in:
Sebastien Bourdeauducq 2019-02-12 19:32:58 +08:00
parent 6ad2e13515
commit ea2956bcb8
1 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@
# nix.sandboxPaths = ["/opt"];
{ pkgs ? import <nixpkgs> {}}:
{ target, variant }:
{ target, variant, buildCommand ? "python -m artiq.gateware.targets.${target} -V ${variant}" }:
let
artiqPkgs = import ./default.nix { inherit pkgs; };
@ -47,7 +47,7 @@ in pkgs.stdenv.mkDerivation {
phases = [ "buildPhase" "installPhase" ];
buildPhase =
''
${buildenv}/bin/artiq-dev -c "CARGO_HOME=${cargoVendored} python -m artiq.gateware.targets.${target} -V ${variant}"
${buildenv}/bin/artiq-dev -c "CARGO_HOME=${cargoVendored} ${buildCommand}"
'';
installPhase =
''