forked from M-Labs/artiq
1
0
Fork 0

flake: add other KC705 NIST builds

This commit is contained in:
Sebastien Bourdeauducq 2021-09-10 17:19:32 +08:00
parent a573dcf3f9
commit 2e5c32878f
1 changed files with 270 additions and 247 deletions

View File

@ -16,6 +16,7 @@
url = "https://static.rust-lang.org/dist/2021-01-29/channel-rust-nightly.toml"; url = "https://static.rust-lang.org/dist/2021-01-29/channel-rust-nightly.toml";
sha256 = "sha256-EZKgw89AH4vxaJpUHmIMzMW/80wAFQlfcxRoBD9nz0c="; sha256 = "sha256-EZKgw89AH4vxaJpUHmIMzMW/80wAFQlfcxRoBD9nz0c=";
}; };
targets = []; targets = [];
rustChannelOfTargets = _channel: _date: targets: rustChannelOfTargets = _channel: _date: targets:
(pkgs.lib.rustLib.fromManifestFile rustManifest { (pkgs.lib.rustLib.fromManifestFile rustManifest {
@ -29,6 +30,7 @@
rustc = rust; rustc = rust;
cargo = rust; cargo = rust;
}); });
vivadoDeps = pkgs: with pkgs; [ vivadoDeps = pkgs: with pkgs; [
ncurses5 ncurses5
zlib zlib
@ -41,8 +43,7 @@
xorg.libXtst xorg.libXtst
xorg.libXi xorg.libXi
]; ];
in rec {
packages.x86_64-linux = rec {
sipyco = pkgs.python3Packages.buildPythonPackage { sipyco = pkgs.python3Packages.buildPythonPackage {
name = "sipyco"; name = "sipyco";
src = src-sipyco; src = src-sipyco;
@ -206,7 +207,6 @@
runScript = "vivado"; runScript = "vivado";
}; };
artiq-board-kc705-nist_clock = let
makeArtiqBoardPackage = { target, variant, buildCommand ? "python -m artiq.gateware.targets.${target} -V ${variant}" }: makeArtiqBoardPackage = { target, variant, buildCommand ? "python -m artiq.gateware.targets.${target} -V ${variant}" }:
pkgs.python3Packages.toPythonModule (pkgs.stdenv.mkDerivation { pkgs.python3Packages.toPythonModule (pkgs.stdenv.mkDerivation {
name = "artiq-board-${target}-${variant}"; name = "artiq-board-${target}-${variant}";
@ -260,10 +260,6 @@
# don't mangle ELF files as they are not for NixOS # don't mangle ELF files as they are not for NixOS
dontFixup = true; dontFixup = true;
}); });
in makeArtiqBoardPackage {
target = "kc705";
variant = "nist_clock";
};
openocd-bscanspi = let openocd-bscanspi = let
bscan_spi_bitstreams-pkg = pkgs.stdenv.mkDerivation { bscan_spi_bitstreams-pkg = pkgs.stdenv.mkDerivation {
@ -294,6 +290,33 @@
name = "openocd-bscanspi"; name = "openocd-bscanspi";
paths = [ openocd-fixed bscan_spi_bitstreams-pkg ]; paths = [ openocd-fixed bscan_spi_bitstreams-pkg ];
}; };
in rec {
packages.x86_64-linux = rec {
inherit migen misoc vivadoEnv vivado openocd-bscanspi artiq;
artiq-board-kc705-nist_clock = makeArtiqBoardPackage {
target = "kc705";
variant = "nist_clock";
};
artiq-board-kc705-nist_qc2 = makeArtiqBoardPackage {
target = "kc705";
variant = "nist_qc2";
};
artiq-board-kc705-nist_clock_master = makeArtiqBoardPackage {
target = "kc705";
variant = "nist_clock_master";
};
artiq-board-kc705-nist_qc2_master = makeArtiqBoardPackage {
target = "kc705";
variant = "nist_qc2_master";
};
artiq-board-kc705-nist_clock_satellite = makeArtiqBoardPackage {
target = "kc705";
variant = "nist_clock";
};
artiq-board-kc705-nist_qc2_satellite = makeArtiqBoardPackage {
target = "kc705";
variant = "nist_qc2";
};
}; };
defaultPackage.x86_64-linux = pkgs.python3.withPackages(ps: [ packages.x86_64-linux.artiq ]); defaultPackage.x86_64-linux = pkgs.python3.withPackages(ps: [ packages.x86_64-linux.artiq ]);