From de466e67cf1675264ad056c2bdc1717eb49537ac Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Fri, 22 Feb 2019 23:46:16 +0800 Subject: [PATCH] build device database templates --- sinara-systems.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/sinara-systems.nix b/sinara-systems.nix index c1af6eb..ef4c1e5 100644 --- a/sinara-systems.nix +++ b/sinara-systems.nix @@ -15,6 +15,7 @@ let target = "kasli"; variants = ["berkeley" "ist" "mitll2" "mitll" "nudt" "sysu" "tsinghua2" "tsinghua" "ubirmingham" "unsw" "ustc" "wipm"]; + artiq = import { inherit pkgs; }; artiq-board = import { inherit pkgs; }; conda-artiq-board = import { inherit pkgs; }; src = pkgs.fetchgit { @@ -36,7 +37,18 @@ let "conda-artiq-board-\''${target}-\''${variant}" = conda-artiq-board { boardBinaries = boardBinaries; inherit target variant; - }; + }; + "device-db-\''${target}-\''${variant}" = pkgs.stdenv.mkDerivation { + name = "device-db-\''${target}-\''${variant}"; + buildInputs = [ artiq.artiq ]; + phases = [ "buildPhase" ]; + buildPhase = " + mkdir \$out + artiq_ddb_template \''${json} -o \$out/device_db.py + mkdir \$out/nix-support + echo file device_db_template \$out/device_db.py >> \$out/nix-support/hydra-build-products + "; + }; }) {} variants; in generic-kasli // {