artiq-board.nix: move inputs outside inner function, accept vivado as arg to cut memory usage
This commit is contained in:
parent
08d28437e4
commit
f1325dce29
|
@ -1,11 +1,9 @@
|
|||
# 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
|
||||
, vivado ? import ./vivado.nix { inherit pkgs; }
|
||||
}:
|
||||
|
||||
let
|
||||
artiqSrc = import ./pkgs/artiq-src.nix { fetchgit = pkgs.fetchgit; };
|
||||
|
@ -44,11 +42,15 @@ let
|
|||
'';
|
||||
};
|
||||
|
||||
vivado = import ./vivado.nix { inherit pkgs; };
|
||||
in
|
||||
{ target
|
||||
, variant
|
||||
, buildCommand ? "python -m artiq.gateware.targets.${target} -V ${variant}"
|
||||
, extraInstallCommands ? ""}:
|
||||
|
||||
# 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 {
|
||||
pkgs.python3Packages.toPythonModule (pkgs.stdenv.mkDerivation rec {
|
||||
name = "artiq-board-${target}-${variant}-${version}";
|
||||
version = import ./pkgs/artiq-version.nix (with pkgs; { inherit stdenv fetchgit git; });
|
||||
phases = [ "buildPhase" "installCheckPhase" "installPhase" ];
|
||||
|
|
|
@ -100,7 +100,8 @@ let
|
|||
"uamsterdam"
|
||||
]);
|
||||
|
||||
artiq-board = import ./fast/artiq-board.nix { inherit pkgs; };
|
||||
vivado = import ./fast/vivado.nix { inherit pkgs; };
|
||||
artiq-board = import ./fast/artiq-board.nix { inherit pkgs vivado; };
|
||||
conda-artiq-board = import ./conda-artiq-board.nix { inherit pkgs; };
|
||||
src = pkgs.fetchgit {
|
||||
url = "https://git.m-labs.hk/M-Labs/sinara-systems.git";
|
||||
|
|
Loading…
Reference in New Issue