add nix build script

master
Sebastien Bourdeauducq 2019-02-12 19:57:49 +08:00
parent ef5ae20fe7
commit f487eb6421
1 changed files with 27 additions and 0 deletions

27
nix/release.nix Normal file
View File

@ -0,0 +1,27 @@
{ pkgs ? import <nixpkgs> {}}:
let
artiq-board = import <artiqSrc/nix/artiq-board.nix> { inherit pkgs; };
conda-board = import <artiqSrc/nix/conda-board.nix> { inherit pkgs; };
target = "kasli";
variants = ["berkeley" "mitll2" "mitll" "nudt" "sysu" "tsinghua2" "tsinghua" "unsw" "ustc" "wipm"];
jobs = pkgs.lib.lists.foldr (variant: start:
let
json = ../. + "/${variant}.json";
boardBinaries = artiq-board {
inherit target variant;
buildCommand = "python -m artiq.gateware.targets.kasli_generic ${json}";
};
in
start // {
"artiq-board-${target}-${variant}" = boardBinaries;
"conda-artiq-board-${target}-${variant}" = conda-board {
artiqSrc = <artiqSrc>;
boardBinaries = boardBinaries;
inherit target variant;
};
}) {} variants;
in
jobs