diff --git a/flake.nix b/flake.nix index 15a90e4..f5d7b7b 100644 --- a/flake.nix +++ b/flake.nix @@ -122,8 +122,7 @@ "nist_clock_satellite" "nist_qc2_satellite" "acpki_nist_clock_satellite" "acpki_nist_qc2_satellite" "nist_clock_satellite_100mhz" "nist_qc2_satellite_100mhz" "acpki_nist_clock_satellite_100mhz" "acpki_nist_qc2_satellite_100mhz" ]; - build = { target, variant, json ? null, output ? null }: let - # output - if null will build everything (fw, gw, jtag, sd) or can be specified to build only one + build = { target, variant, json ? null }: let szl = zynqpkgs."${target}-szl"; fsbl = zynqpkgs."${target}-fsbl"; fwtype = if builtins.elem variant sat_variants then "satman" else "runtime"; @@ -236,26 +235,17 @@ mkbootimage boot.bif $out/boot.bin echo file binary-dist $out/boot.bin >> $out/nix-support/hydra-build-products ''; - in ( - if output == null || output == "firmware" then { - "${target}-${variant}-firmware" = firmware; - } else {} - ) // ( - if output == null || output == "gateware" then { - "${target}-${variant}-gateware" = gateware; - } else {} - ) // ( - if output == null || output == "jtag" then { - "${target}-${variant}-jtag" = jtag; - } else {} - ) // ( - if output == null || output == "sd" then { - "${target}-${variant}-sd" = sd; - } else {} - ) // ( - if builtins.elem target fsblTargets && (output == null || output == "fsbl-sd") then { - "${target}-${variant}-fsbl-sd" = fsbl-sd; - } else {} + in { + "${target}-${variant}-firmware" = firmware; + "${target}-${variant}-gateware" = gateware; + "${target}-${variant}-jtag" = jtag; + "${target}-${variant}-sd" = sd; + } // ( + if builtins.elem target fsblTargets + then { + "${target}-${variant}-fsbl-sd" = fsbl-sd; + } + else {} ); gateware-sim = pkgs.stdenv.mkDerivation {