From baa656c60a09b12f6e879460e969dcb11eb78547 Mon Sep 17 00:00:00 2001 From: Quinn Unger Date: Wed, 7 Oct 2026 14:26:12 +0100 Subject: [PATCH] vivado: add supportedDevices option --- pkgs/vivado/vivado-unwrapped.nix | 54 ++++++++++++++++++++++---------- pkgs/vivado/vivado.nix | 22 +++++++++++-- 2 files changed, 58 insertions(+), 18 deletions(-) diff --git a/pkgs/vivado/vivado-unwrapped.nix b/pkgs/vivado/vivado-unwrapped.nix index 6fad352..7b6fab2 100644 --- a/pkgs/vivado/vivado-unwrapped.nix +++ b/pkgs/vivado/vivado-unwrapped.nix @@ -5,7 +5,25 @@ requireFile, stdenvNoCC, writeText, - installerConfig ? { }, + # Install everything supported by basic (FREE) license tier + supportedDevices ? [ + "Artix-7 FPGAs" + "Artix UltraScale+ FPGAs" + "Kintex-7 FPGAs" + "Kintex UltraScale FPGAs" + "Kintex UltraScale+ FPGAs" + "Spartan-7 FPGAs" + "Spartan UltraScale+" + "Zynq-7000 All Programmable SoC" + "Zynq UltraScale+ MPSoCs" + # "Zynq UltraScale+ RFSoCs" + "Virtex-7 FPGAs" + # "Virtex UltraScale FPGAs" + # "Virtex UltraScale+ FPGAs" + # "Virtex UltraScale+ 58G FPGAs" + # "Virtex UltraScale+ HBM FPGAs" + ], + extraConfig ? { }, installerConfigFile ? null, extraInstallerPkgs ? pkgs: [ ], ... @@ -26,7 +44,7 @@ let generateConfig = lib.concatMapAttrsStringSep "\n" writeConfigEntry; - defaultConfig = { + config = lib.recursiveUpdate { Edition = "Vivado Design Suite"; Product = "Vivado"; Modules = { @@ -41,30 +59,36 @@ let "Vitis Networking P4" = false; # Artix - "Artix-7 FPGAs" = true; + "Artix-7 FPGAs" = false; "Artix UltraScale+ FPGAs" = false; # Kintex - "Kintex-7 FPGAs" = true; + "Kintex-7 FPGAs" = false; "Kintex UltraScale FPGAs" = false; "Kintex UltraScale+ FPGAs" = false; # Spartan - "Spartan-7 FPGAs" = true; + "Spartan-7 FPGAs" = false; "Spartan UltraScale+" = false; # Zynq - "Zynq-7000 All Programmable SoC" = true; + "Zynq-7000 All Programmable SoC" = false; "Zynq UltraScale+ MPSoCs" = false; "Zynq UltraScale+ RFSoCs" = false; # Virtex - "Virtex-7 FPGAs" = true; + "Virtex-7 FPGAs" = false; "Virtex UltraScale FPGAs" = false; "Virtex UltraScale+ FPGAs" = false; "Virtex UltraScale+ 58G FPGAs" = false; "Virtex UltraScale+ HBM FPGAs" = false; - }; + } + // (builtins.listToAttrs ( + map (x: { + name = x; + value = true; + }) supportedDevices + )); Destination = ""; # Choose the post install scripts you'd like to run as part of the finalization step. Please note that some of these scripts may require user interaction during runtime. InstallOptions."Acquire or Manage a License Key" = false; @@ -76,17 +100,17 @@ let CreateFileAssociation = true; # Choose whether shortcuts will be created on the desktop or not. CreateDesktopShortcuts = false; - }; + } extraConfig; + configFile = + if installerConfigFile != null then + installerConfigFile + else + writeText "install_config.txt" (generateConfig config); in stdenvNoCC.mkDerivation ( finalAttrs: let - configFile = - if installerConfigFile != null then - installerConfigFile - else - writeText "install_config.txt" (generateConfig (lib.recursiveUpdate defaultConfig installerConfig)); installerFHS = buildFHSEnv { pname = "vivado-installer-env"; version = finalAttrs.version; @@ -109,9 +133,7 @@ stdenvNoCC.mkDerivation ( export HOME=/home/user ''; }; - in - { pname = "vivado-unwrapped"; version = "2026.1"; diff --git a/pkgs/vivado/vivado.nix b/pkgs/vivado/vivado.nix index 82df75a..321a347 100644 --- a/pkgs/vivado/vivado.nix +++ b/pkgs/vivado/vivado.nix @@ -18,11 +18,29 @@ extraPkgs ? pkgs: [ ], # Unwrapped config: - installerConfig ? { }, # See defaultConfig in vivado-unwrapped.nix for example usage. + # Install all devices supported by basic (FREE) license tier + supportedDevices ? [ + "Artix-7 FPGAs" + "Artix UltraScale+ FPGAs" + "Kintex-7 FPGAs" + "Kintex UltraScale FPGAs" + "Kintex UltraScale+ FPGAs" + "Spartan-7 FPGAs" + "Spartan UltraScale+" + "Zynq-7000 All Programmable SoC" + "Zynq UltraScale+ MPSoCs" + # "Zynq UltraScale+ RFSoCs" + "Virtex-7 FPGAs" + # "Virtex UltraScale FPGAs" + # "Virtex UltraScale+ FPGAs" + # "Virtex UltraScale+ 58G FPGAs" + # "Virtex UltraScale+ HBM FPGAs" + ], + extraConfig ? { }, # See defaultConfig in vivado-unwrapped.nix for example usage. installerConfigFile ? null, # optionally, use the path to your install_config.txt # Optionally override unwrapped directly if you want to install a different version of vivado. unwrapped ? callPackage ./vivado-unwrapped.nix { - inherit installerConfig installerConfigFile; + inherit supportedDevices extraConfig installerConfigFile; }, ... }: -- 2.51.2