artiq-board: move inputs outside inner function

wfvm
Astro 2020-06-17 22:15:11 +02:00
parent f5429f28ae
commit b876be5ef9
1 changed files with 9 additions and 6 deletions

View File

@ -1,13 +1,11 @@
# Install Vivado in /opt and add to /etc/nixos/configuration.nix:
# nix.sandboxPaths = ["/opt"];
{ pkgs }:
{ target
, variant
, buildCommand ? "python -m artiq.gateware.targets.${target} -V ${variant}"
, extraInstallCommands ? ""}:
{ pkgs
}:
let
vivado = builtins.trace "vivado" (import ./vivado.nix { inherit pkgs; });
artiqSrc = import ./pkgs/artiq-src.nix { fetchgit = pkgs.fetchgit; };
artiqpkgs = builtins.trace "artiqpkgs" (import ./default.nix { inherit pkgs; });
fetchcargo = import ./fetchcargo.nix {
@ -44,8 +42,13 @@ let
'';
};
vivado = builtins.trace "vivado" (import ./vivado.nix { inherit pkgs; });
in
{ target
, variant
, buildCommand ? "python -m artiq.gateware.targets.${target} -V ${variant}"
, extraInstallCommands ? ""}:
let
# Board packages are Python modules so that they get added to the ARTIQ Python
# environment, and artiq_flash finds them.
in pkgs.python3Packages.toPythonModule (pkgs.stdenv.mkDerivation rec {