From c4532606111b6d756753ea979fded76fad303e2c Mon Sep 17 00:00:00 2001 From: Stephan Maka Date: Thu, 9 Jan 2020 00:33:52 +0100 Subject: [PATCH 1/6] artiq-fast: build gateware from a self-contained separate source derivation Addresses item 2. of Gitea issue #1. --- artiq-fast/artiq-board.nix | 146 +++++++++++++++++++++++++------------ 1 file changed, 100 insertions(+), 46 deletions(-) diff --git a/artiq-fast/artiq-board.nix b/artiq-fast/artiq-board.nix index ac591af..69ae67c 100644 --- a/artiq-fast/artiq-board.nix +++ b/artiq-fast/artiq-board.nix @@ -6,6 +6,7 @@ }: let + version = import ./pkgs/artiq-version.nix (with pkgs; { inherit stdenv fetchgit git; }); artiqSrc = import ./pkgs/artiq-src.nix { fetchgit = pkgs.fetchgit; }; artiqpkgs = import ./default.nix { inherit pkgs; }; fetchcargo = import ./fetchcargo.nix { @@ -41,59 +42,112 @@ let cp -R * $out/registry ''; }; - in { target , variant , src ? null , 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. -pkgs.python3Packages.toPythonModule (pkgs.stdenv.mkDerivation rec { +let name = "artiq-board-${target}-${variant}-${version}"; - version = import ./pkgs/artiq-version.nix (with pkgs; { inherit stdenv fetchgit git; }); - inherit src; - phases = [ "buildPhase" "installCheckPhase" "installPhase" "checkPhase" ]; - nativeBuildInputs = [ - vivado - pkgs.gnumake - artiqpkgs.cargo - artiqpkgs.rustc - artiqpkgs.binutils-or1k - artiqpkgs.llvm-or1k - ]; - buildInputs = [ (pkgs.python3.withPackages(ps: with ps; [ jinja2 numpy artiqpkgs.migen artiqpkgs.microscope artiqpkgs.misoc artiqpkgs.jesd204b artiqpkgs.artiq ])) ]; - buildPhase = - '' - export CARGO_HOME=${cargoVendored} - export TARGET_AR=or1k-linux-ar - ${buildCommand} + installPath = "${pkgs.python3Packages.python.sitePackages}/artiq/board-support/${target}-${variant}"; + + boardModule = + # Board packages are Python modules so that they get added to the ARTIQ Python + # environment, and artiq_flash finds them. + pkgs.python3Packages.toPythonModule (pkgs.stdenv.mkDerivation { + name = "${name}-firmware"; + inherit version src; + phases = [ "buildPhase" "installCheckPhase" "installPhase" "checkPhase" ]; + nativeBuildInputs = [ + vivado + pkgs.gnumake pkgs.which + artiqpkgs.cargo + artiqpkgs.rustc + artiqpkgs.binutils-or1k + artiqpkgs.llvm-or1k + ]; + buildInputs = [ + (pkgs.python3.withPackages(ps: with ps; [ jinja2 numpy artiqpkgs.migen artiqpkgs.microscope artiqpkgs.misoc artiqpkgs.jesd204b artiqpkgs.artiq ])) + ]; + buildPhase = + '' + export CARGO_HOME=${cargoVendored} + export TARGET_AR=or1k-linux-ar + ${buildCommand} --no-compile-gateware + ''; + installPhase = + '' + TARGET_DIR=$out/${installPath} + mkdir -p $TARGET_DIR $out/src + + cp -ar artiq_${target}/${variant}/gateware $out/src/ + + if [ -e artiq_${target}/${variant}/software/bootloader/bootloader.bin ] + then cp artiq_${target}/${variant}/software/bootloader/bootloader.bin $TARGET_DIR + fi + if [ -e artiq_${target}/${variant}/software/runtime ] + then cp artiq_${target}/${variant}/software/runtime/runtime.{elf,fbi} $TARGET_DIR + else cp artiq_${target}/${variant}/software/satman/satman.{elf,fbi} $TARGET_DIR + fi + ${extraInstallCommands} + ''; + }); + + vivadoInputArchive = pkgs.stdenv.mkDerivation { + name = "${name}-vivado-input.nar.base64"; + buildInputs = [ pkgs.nix ]; + phases = [ "installPhase" ]; + installPhase = "nix-store --dump ${boardModule}/src/gateware | base64 -w0 > $out"; + }; + + # Funnelling the source code through a Nix string allows dropping + # all dependencies via `unsafeDiscardStringContext`. The gateware + # will then be rebuilt only when these contents have changed. + pureVivadoInputArchive = builtins.toFile "${name}-vivado-input.nar.base64" ( + builtins.unsafeDiscardStringContext ( + builtins.readFile vivadoInputArchive + )); + + # Depends on just Vivado and the generated Bitstream source + vivadoOutput = pkgs.stdenvNoCC.mkDerivation { + name = builtins.unsafeDiscardStringContext "${name}-vivado-output"; + + unpackPhase = "base64 -d < ${pureVivadoInputArchive} | nix-store --restore gateware"; + buildInputs = [ vivado pkgs.nix ]; + buildPhase = '' + cd gateware + vivado -mode batch -source top.tcl ''; - # temporarily disabled because there is currently always at least one Kasli bitstream - # that fails timing and blocks the conda channel. - doCheck = false; - checkPhase = '' - # Search for PCREs in the Vivado output to check for errors - check_log() { - grep -Pe "$1" artiq_${target}/${variant}/gateware/vivado.log && exit 1 || true - } - check_log "\d+ constraint not met\." - check_log "Timing constraints are not met\." + + installPhase = '' + TARGET_DIR=$out/${builtins.unsafeDiscardStringContext installPath} + mkdir -p $TARGET_DIR + + chmod a+r top.bit + cp top.bit $TARGET_DIR ''; - installPhase = - '' - TARGET_DIR=$out/${pkgs.python3Packages.python.sitePackages}/artiq/board-support/${target}-${variant} - mkdir -p $TARGET_DIR - cp artiq_${target}/${variant}/gateware/top.bit $TARGET_DIR - if [ -e artiq_${target}/${variant}/software/bootloader/bootloader.bin ] - then cp artiq_${target}/${variant}/software/bootloader/bootloader.bin $TARGET_DIR - fi - if [ -e artiq_${target}/${variant}/software/runtime ] - then cp artiq_${target}/${variant}/software/runtime/runtime.{elf,fbi} $TARGET_DIR - else cp artiq_${target}/${variant}/software/satman/satman.{elf,fbi} $TARGET_DIR - fi - ${extraInstallCommands} + + # temporarily disabled because there is currently always at least one Kasli bitstream + # that fails timing and blocks the conda channel. + doCheck = false; + checkPhase = '' + # Search for PCREs in the Vivado output to check for errors + check_log() { + set +e + grep -Pe "$1" vivado.log + FOUND=$? + set -e + if [ $FOUND != 1 ]; then + exit 1 + fi + } + check_log "\d+ constraint not met\." + check_log "Timing constraints are not met\." ''; -}) + }; +in pkgs.buildEnv rec { + inherit name; + paths = [ boardModule vivadoOutput ]; + pathsToLink = [ "/${installPath}" ]; +} -- 2.44.2 From a30db2ba2e5e227c564df12ecf477748e5c4d0d5 Mon Sep 17 00:00:00 2001 From: Stephan Maka Date: Tue, 25 Aug 2020 01:20:51 +0200 Subject: [PATCH 2/6] artiq-board: get/remove/re-add version identifiers --- artiq-fast/artiq-board.nix | 64 ++++++++++++++++++++---- artiq-fast/scripts/get-identifiers.py | 24 +++++++++ artiq-fast/scripts/remove-identifiers.py | 16 ++++++ 3 files changed, 94 insertions(+), 10 deletions(-) create mode 100644 artiq-fast/scripts/get-identifiers.py create mode 100644 artiq-fast/scripts/remove-identifiers.py diff --git a/artiq-fast/artiq-board.nix b/artiq-fast/artiq-board.nix index 69ae67c..f6237e8 100644 --- a/artiq-fast/artiq-board.nix +++ b/artiq-fast/artiq-board.nix @@ -52,15 +52,14 @@ let name = "artiq-board-${target}-${variant}-${version}"; installPath = "${pkgs.python3Packages.python.sitePackages}/artiq/board-support/${target}-${variant}"; - boardModule = + boardModule = # Board packages are Python modules so that they get added to the ARTIQ Python # environment, and artiq_flash finds them. pkgs.python3Packages.toPythonModule (pkgs.stdenv.mkDerivation { name = "${name}-firmware"; inherit version src; phases = [ "buildPhase" "installCheckPhase" "installPhase" "checkPhase" ]; - nativeBuildInputs = [ - vivado + buildInputs = [ pkgs.gnumake pkgs.which artiqpkgs.cargo artiqpkgs.rustc @@ -94,11 +93,28 @@ let ''; }); + vivadoIdentifiers = import (pkgs.stdenv.mkDerivation { + name = "${name}-vivado-identifiers.nix"; + src = "${boardModule}/src/gateware"; + buildInputs = [ pkgs.python ]; + phases = [ "unpackPhase" "buildPhase" ]; + buildPhase = "python ${./scripts/get-identifiers.py} top.v > $out"; + }); + + vivadoInput = pkgs.stdenv.mkDerivation { + name = "${name}-vivado-input"; + src = "${boardModule}/src/gateware"; + buildInputs = [ pkgs.python ]; + phases = [ "unpackPhase" "patchPhase" "installPhase" ]; + patchPhase = "python ${./scripts/remove-identifiers.py} top.v"; + installPhase = "cp -ar . $out"; + }; + vivadoInputArchive = pkgs.stdenv.mkDerivation { name = "${name}-vivado-input.nar.base64"; buildInputs = [ pkgs.nix ]; phases = [ "installPhase" ]; - installPhase = "nix-store --dump ${boardModule}/src/gateware | base64 -w0 > $out"; + installPhase = "nix-store --dump ${vivadoInput} | base64 -w0 > $out"; }; # Funnelling the source code through a Nix string allows dropping @@ -110,22 +126,49 @@ let )); # Depends on just Vivado and the generated Bitstream source - vivadoOutput = pkgs.stdenvNoCC.mkDerivation { - name = builtins.unsafeDiscardStringContext "${name}-vivado-output"; + vivadoCheckpoint = pkgs.stdenvNoCC.mkDerivation { + name = builtins.unsafeDiscardStringContext "${name}-vivado-checkpoint"; unpackPhase = "base64 -d < ${pureVivadoInputArchive} | nix-store --restore gateware"; buildInputs = [ vivado pkgs.nix ]; buildPhase = '' cd gateware - vivado -mode batch -source top.tcl + vivado -mode batch -source top_route.tcl ''; + installPhase = '' + mkdir -p $out + + chmod a+r top_route.dcp + cp top_route.dcp $out + cp top_bitstream.tcl $out + ''; + }; + + vivadoOutput = pkgs.stdenvNoCC.mkDerivation { + name = builtins.unsafeDiscardStringContext "${name}-vivado-output"; + src = vivadoCheckpoint; + buildInputs = [ vivado ]; + buildPhase = + '' + cat >top.tcl < Date: Wed, 26 Aug 2020 21:35:25 +0200 Subject: [PATCH 3/6] artiq-board: use legacy code for artiq<6 --- artiq-fast/artiq-board-legacy.nix | 99 +++++++++++++++++++++++++++++++ artiq-fast/default.nix | 6 +- artiq-full.nix | 6 +- 3 files changed, 109 insertions(+), 2 deletions(-) create mode 100644 artiq-fast/artiq-board-legacy.nix diff --git a/artiq-fast/artiq-board-legacy.nix b/artiq-fast/artiq-board-legacy.nix new file mode 100644 index 0000000..789d15a --- /dev/null +++ b/artiq-fast/artiq-board-legacy.nix @@ -0,0 +1,99 @@ +# Install Vivado in /opt and add to /etc/nixos/configuration.nix: +# nix.sandboxPaths = ["/opt"]; + +{ pkgs +, vivado ? import ./vivado.nix { inherit pkgs; } +}: + +let + artiqSrc = import ./pkgs/artiq-src.nix { fetchgit = pkgs.fetchgit; }; + artiqpkgs = import ./default.nix { inherit pkgs; }; + fetchcargo = import ./fetchcargo.nix { + inherit (pkgs) stdenv cacert git; + inherit (artiqpkgs) cargo cargo-vendor; + }; + cargoDeps = fetchcargo rec { + name = "artiq-firmware-cargo-deps"; + src = "${artiqSrc}/artiq/firmware"; + sha256 = (import "${artiqSrc}/artiq/firmware/cargosha256.nix"); + }; + + cargoVendored = pkgs.stdenv.mkDerivation { + name = "artiq-firmware-cargo-vendored"; + src = cargoDeps; + phases = [ "unpackPhase" "installPhase" ]; + installPhase = + '' + mkdir -p $out/registry + cat << EOF > $out/config + [source.crates-io] + registry = "https://github.com/rust-lang/crates.io-index" + replace-with = "vendored-sources" + + [source."https://github.com/m-labs/libfringe"] + git = "https://github.com/m-labs/libfringe" + rev = "b8a6d8f" + replace-with = "vendored-sources" + + [source.vendored-sources] + directory = "$out/registry" + EOF + cp -R * $out/registry + ''; + }; + +in +{ target +, variant +, src ? null +, 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. +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; }); + inherit src; + phases = [ "buildPhase" "installCheckPhase" "installPhase" "checkPhase" ]; + buildInputs = [ + vivado + pkgs.gnumake + (pkgs.python3.withPackages(ps: with ps; [ jinja2 numpy artiqpkgs.migen artiqpkgs.microscope artiqpkgs.misoc artiqpkgs.jesd204b artiqpkgs.artiq ])) + artiqpkgs.cargo + artiqpkgs.rustc + artiqpkgs.binutils-or1k + artiqpkgs.llvm-or1k + ]; + buildPhase = + '' + export CARGO_HOME=${cargoVendored} + export TARGET_AR=or1k-linux-ar + ${buildCommand} + ''; + # temporarily disabled because there is currently always at least one Kasli bitstream + # that fails timing and blocks the conda channel. + doCheck = false; + checkPhase = '' + # Search for PCREs in the Vivado output to check for errors + check_log() { + grep -Pe "$1" artiq_${target}/${variant}/gateware/vivado.log && exit 1 || true + } + check_log "\d+ constraint not met\." + check_log "Timing constraints are not met\." + ''; + installPhase = + '' + TARGET_DIR=$out/${pkgs.python3Packages.python.sitePackages}/artiq/board-support/${target}-${variant} + mkdir -p $TARGET_DIR + cp artiq_${target}/${variant}/gateware/top.bit $TARGET_DIR + if [ -e artiq_${target}/${variant}/software/bootloader/bootloader.bin ] + then cp artiq_${target}/${variant}/software/bootloader/bootloader.bin $TARGET_DIR + fi + if [ -e artiq_${target}/${variant}/software/runtime ] + then cp artiq_${target}/${variant}/software/runtime/runtime.{elf,fbi} $TARGET_DIR + else cp artiq_${target}/${variant}/software/satman/satman.{elf,fbi} $TARGET_DIR + fi + ${extraInstallCommands} + ''; +}) diff --git a/artiq-fast/default.nix b/artiq-fast/default.nix index 91ec860..e11a097 100644 --- a/artiq-fast/default.nix +++ b/artiq-fast/default.nix @@ -10,7 +10,11 @@ let ]; boardPackages = pkgs.lib.lists.foldr (board: start: let - boardBinaries = import ./artiq-board.nix { inherit pkgs; } { + packageImport = + if artiq6 + then ./artiq-board.nix + else ./artiq-board-legacy.nix; + boardBinaries = import packageImport { inherit pkgs; } { target = board.target; variant = board.variant; }; diff --git a/artiq-full.nix b/artiq-full.nix index d5ae0a5..ca52548 100644 --- a/artiq-full.nix +++ b/artiq-full.nix @@ -108,7 +108,11 @@ let ]); vivado = import ./fast/vivado.nix { inherit pkgs; }; - artiq-board = import ./fast/artiq-board.nix { inherit pkgs vivado; }; + artiq-board-import = + if pkgs.lib.strings.versionAtLeast artiq-fast.artiq.version "6.0" + then ./fast/artiq-board.nix + else ./fast/artiq-board-legacy.nix; + artiq-board = import artiq-board-import { 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"; -- 2.44.2 From 85c4719f3372e4f23634366e9b0d717e3d95673e Mon Sep 17 00:00:00 2001 From: Stephan Maka Date: Fri, 28 Aug 2020 00:47:13 +0200 Subject: [PATCH 4/6] artiq-board: use new --gateware-identifier-str --- artiq-fast/artiq-board.nix | 30 ++++++++---------------- artiq-fast/generate-identifier.py | 24 +++++++++++++++++++ artiq-fast/scripts/get-identifiers.py | 24 ------------------- artiq-fast/scripts/remove-identifiers.py | 16 ------------- 4 files changed, 34 insertions(+), 60 deletions(-) create mode 100755 artiq-fast/generate-identifier.py delete mode 100644 artiq-fast/scripts/get-identifiers.py delete mode 100644 artiq-fast/scripts/remove-identifiers.py diff --git a/artiq-fast/artiq-board.nix b/artiq-fast/artiq-board.nix index f6237e8..d2f58f8 100644 --- a/artiq-fast/artiq-board.nix +++ b/artiq-fast/artiq-board.nix @@ -59,7 +59,7 @@ let name = "${name}-firmware"; inherit version src; phases = [ "buildPhase" "installCheckPhase" "installPhase" "checkPhase" ]; - buildInputs = [ + nativeBuildInputs = [ pkgs.gnumake pkgs.which artiqpkgs.cargo artiqpkgs.rustc @@ -73,7 +73,7 @@ let '' export CARGO_HOME=${cargoVendored} export TARGET_AR=or1k-linux-ar - ${buildCommand} --no-compile-gateware + ${buildCommand} --no-compile-gateware --gateware-identifier-str=unprogrammed ''; installPhase = '' @@ -93,28 +93,18 @@ let ''; }); - vivadoIdentifiers = import (pkgs.stdenv.mkDerivation { - name = "${name}-vivado-identifiers.nix"; - src = "${boardModule}/src/gateware"; - buildInputs = [ pkgs.python ]; - phases = [ "unpackPhase" "buildPhase" ]; - buildPhase = "python ${./scripts/get-identifiers.py} top.v > $out"; - }); - - vivadoInput = pkgs.stdenv.mkDerivation { - name = "${name}-vivado-input"; - src = "${boardModule}/src/gateware"; - buildInputs = [ pkgs.python ]; - phases = [ "unpackPhase" "patchPhase" "installPhase" ]; - patchPhase = "python ${./scripts/remove-identifiers.py} top.v"; - installPhase = "cp -ar . $out"; - }; + identifierStr = "${version};${variant}"; + identifiers = import ( + pkgs.runCommandLocal "${name}-identifiers.nix" { + buildInputs = [ pkgs.python3 ]; + } ''python ${./generate-identifier.py} "${identifierStr}" > $out'' + ); vivadoInputArchive = pkgs.stdenv.mkDerivation { name = "${name}-vivado-input.nar.base64"; buildInputs = [ pkgs.nix ]; phases = [ "installPhase" ]; - installPhase = "nix-store --dump ${vivadoInput} | base64 -w0 > $out"; + installPhase = "nix-store --dump ${boardModule}/src/gateware | base64 -w0 > $out"; }; # Funnelling the source code through a Nix string allows dropping @@ -158,7 +148,7 @@ let '' set_property INIT ${init} [get_cell ${cell}] '' - ) vivadoIdentifiers) + + ) identifiers) + '' source "top_bitstream.tcl" EOF diff --git a/artiq-fast/generate-identifier.py b/artiq-fast/generate-identifier.py new file mode 100755 index 0000000..942505b --- /dev/null +++ b/artiq-fast/generate-identifier.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python +# +# Encodes data like ARTIQ build_soc.py ReprogrammableIdentifier + +import sys + +if len(sys.argv) != 2: + raise ValueError('argument missing') + +identifier_str = sys.argv[1] +contents = list(identifier_str.encode()) +l = len(contents) +if l > 255: + raise ValueError("Identifier string must be 255 characters or less") +contents.insert(0, l) + +f = sys.stdout +f.write("[\n"); +for i in range(7): + init = sum(1 << j if c & (1 << i) else 0 for j, c in enumerate(contents)) + f.write( + ' {{ cell = "identifier_str{}"; init = "256\'h{:X}"; }}\n'.format(i, init) + ) +f.write("]\n"); diff --git a/artiq-fast/scripts/get-identifiers.py b/artiq-fast/scripts/get-identifiers.py deleted file mode 100644 index 15edea0..0000000 --- a/artiq-fast/scripts/get-identifiers.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python - -import sys, re - -if len(sys.argv) != 2: - raise ValueError('Filename argument missing') - -filename = sys.argv[1] - -with open(filename, 'r') as f: - data = f.read() - -identifiers = re.findall(r"\.INIT\((\d+'d\d+\)\s*\)\s*identifier_str\d+)", data) - -f = sys.stdout -f.write("[\n") -for identifier in identifiers: - m = re.match(r"(\d+)'d(\d+)\)\s*\)\s*(\S+)", identifier) - if m is not None: - cell = m.group(3) - # the literal must be converted to hex for Vivado Tcl `set_property` - init = "{}'h{:X}".format(m.group(1), int(m.group(2))) - f.write(' {{ cell = "{}"; init = "{}"; }}\n'.format(cell, init)) -f.write("]\n") diff --git a/artiq-fast/scripts/remove-identifiers.py b/artiq-fast/scripts/remove-identifiers.py deleted file mode 100644 index 88156e2..0000000 --- a/artiq-fast/scripts/remove-identifiers.py +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env python - -import sys, re - -if len(sys.argv) != 2: - raise ValueError('Filename argument missing') - -filename = sys.argv[1] - -with open(filename, 'r') as f: - data = f.read() - -data = re.sub(r"\.INIT\((\d+'d\d+)\)(\s*)\)(\s*)identifier_str", r".INIT(32'hAAAAAAAA)\2)\3identifier_str", data) - -with open(filename, 'w') as f: - f.write(data) -- 2.44.2 From 04fde975ee80b70fddb454516514897d3a74b18b Mon Sep 17 00:00:00 2001 From: Stephan Maka Date: Sun, 29 Nov 2020 19:27:51 +0100 Subject: [PATCH 5/6] artiq-board: fix scope of toPythonModule --- artiq-fast/artiq-board.nix | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/artiq-fast/artiq-board.nix b/artiq-fast/artiq-board.nix index d2f58f8..7850c4d 100644 --- a/artiq-fast/artiq-board.nix +++ b/artiq-fast/artiq-board.nix @@ -55,7 +55,7 @@ let boardModule = # Board packages are Python modules so that they get added to the ARTIQ Python # environment, and artiq_flash finds them. - pkgs.python3Packages.toPythonModule (pkgs.stdenv.mkDerivation { + pkgs.stdenv.mkDerivation { name = "${name}-firmware"; inherit version src; phases = [ "buildPhase" "installCheckPhase" "installPhase" "checkPhase" ]; @@ -91,7 +91,7 @@ let fi ${extraInstallCommands} ''; - }); + }; identifierStr = "${version};${variant}"; identifiers = import ( @@ -180,8 +180,9 @@ let ''; }; in -pkgs.buildEnv rec { - inherit name; - paths = [ boardModule vivadoOutput ]; - pathsToLink = [ "/${installPath}" ]; -} +pkgs.python3Packages.toPythonModule ( + pkgs.buildEnv rec { + inherit name; + paths = [ boardModule vivadoOutput ]; + pathsToLink = [ "/${installPath}" ]; + }) -- 2.44.2 From 494a66b6b5dc9465be930b77498efb72024884e5 Mon Sep 17 00:00:00 2001 From: Stephan Maka Date: Wed, 2 Dec 2020 01:01:16 +0100 Subject: [PATCH 6/6] artiq-fast: add nativeBuildInputs to artiq-board-legacy.nix --- artiq-fast/artiq-board-legacy.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/artiq-fast/artiq-board-legacy.nix b/artiq-fast/artiq-board-legacy.nix index 789d15a..ac591af 100644 --- a/artiq-fast/artiq-board-legacy.nix +++ b/artiq-fast/artiq-board-legacy.nix @@ -56,15 +56,15 @@ pkgs.python3Packages.toPythonModule (pkgs.stdenv.mkDerivation rec { version = import ./pkgs/artiq-version.nix (with pkgs; { inherit stdenv fetchgit git; }); inherit src; phases = [ "buildPhase" "installCheckPhase" "installPhase" "checkPhase" ]; - buildInputs = [ + nativeBuildInputs = [ vivado pkgs.gnumake - (pkgs.python3.withPackages(ps: with ps; [ jinja2 numpy artiqpkgs.migen artiqpkgs.microscope artiqpkgs.misoc artiqpkgs.jesd204b artiqpkgs.artiq ])) artiqpkgs.cargo artiqpkgs.rustc artiqpkgs.binutils-or1k artiqpkgs.llvm-or1k ]; + buildInputs = [ (pkgs.python3.withPackages(ps: with ps; [ jinja2 numpy artiqpkgs.migen artiqpkgs.microscope artiqpkgs.misoc artiqpkgs.jesd204b artiqpkgs.artiq ])) ]; buildPhase = '' export CARGO_HOME=${cargoVendored} -- 2.44.2