From 0e418b215a67650155718428ea32ceddbe9ead06 Mon Sep 17 00:00:00 2001 From: Quinn Unger Date: Mon, 14 Sep 2026 17:22:30 +0100 Subject: [PATCH] quartus: add pro 26.1.1.130 --- pkgs/quartus/quartus-unwrapped.nix | 24 +++++++--- pkgs/quartus/quartus.nix | 76 +++++++++++++++--------------- pkgs/quartus/sources/helpers.nix | 7 +++ pkgs/quartus/sources/lite.nix | 3 -- pkgs/quartus/sources/pro.nix | 40 ++++++++++++++-- pkgs/quartus/sources/standard.nix | 1 - 6 files changed, 97 insertions(+), 54 deletions(-) diff --git a/pkgs/quartus/quartus-unwrapped.nix b/pkgs/quartus/quartus-unwrapped.nix index 0ea1201..97330d3 100644 --- a/pkgs/quartus/quartus-unwrapped.nix +++ b/pkgs/quartus/quartus-unwrapped.nix @@ -13,9 +13,10 @@ let installs = quartusOptions.installs or quartusSource.defaultInstalls; devices = quartusOptions.devices or quartusSource.defaultDevices; + bundledDevices = quartusSource.bundledDevices or [ ]; allInstallers = lib.mapAttrsToList (n: v: n) quartusSource.installers; - allDevices = lib.mapAttrsToList (n: v: n) quartusSource.devices; + allDevices = (lib.mapAttrsToList (n: v: n) quartusSource.devices) ++ bundledDevices; installList = lib.unique ([ quartusSource.quartusInstaller ] ++ installs); installPartList = lib.concatMap ( @@ -33,9 +34,18 @@ let selectedDevices = lib.intersectLists allDevices (lib.unique devices); # TODO: error if device not in list unselectedDevices = lib.subtractLists allDevices selectedDevices; - installPartHashes = lib.mergeAttrsList ( - map (id: quartusSource.installerParts.${id} or { }) allInstallers - ); + installPartTree = lib.mapAttrs ( + n: v: + ( + if (lib.isString v) then + { + hash = v; + suffix = "-linux"; + } + else + v + ) + ) (lib.mergeAttrsList (map (id: quartusSource.installerParts.${id} or { }) allInstallers)); componentTree = lib.mapAttrs ( n: v: (if (lib.isString v) then { ${n} = v; } else v) @@ -60,8 +70,8 @@ let (map ( id: download { - name = "${id}-${version}-linux.qdz"; - hash = installPartHashes.${id}; + name = "${id}-${version}${installPartTree.${id}.suffix}.qdz"; + hash = installPartTree.${id}.hash; } ) installPartList) ++ (lib.concatMap ( @@ -73,7 +83,7 @@ let hash = componentTree.${dev}.${part}; } ) (lib.mapAttrsToList (n: v: n) componentTree.${dev})) - ) selectedDevices) + ) (lib.subtractLists bundledDevices selectedDevices)) ); patches = quartusSource.patches or [ ]; diff --git a/pkgs/quartus/quartus.nix b/pkgs/quartus/quartus.nix index 15db60c..c69c7d1 100644 --- a/pkgs/quartus/quartus.nix +++ b/pkgs/quartus/quartus.nix @@ -39,36 +39,35 @@ buildFHSEnv rec { pname = "quartus-prime-${quartusSource.variant}"; # wrapped inherit (unwrapped) version; - targetPkgs = - pkgs: with pkgs; [ - (runCommand "ld-lsb-compat" { } ( - '' - mkdir -p "$out/lib" - ln -sr "${glibc}/lib/ld-linux-x86-64.so.2" "$out/lib/ld-lsb-x86-64.so.3" - '' - + lib.optionalString withQuesta '' - ln -sr "${pkgsi686Linux.glibc}/lib/ld-linux.so.2" "$out/lib/ld-lsb.so.3" - '' - )) - # quartus requirements - glib - libz # quartus vesion <= v20 - libice - libsm - libxau - libxdmcp - libxscrnsaver - libudev0-shim - bzip2 - brotli - expat - dbus - # qsys requirements - libxtst - libxi - dejavu_fonts - gnumake - ]; + targetPkgs = pkgs: [ + (pkgs.runCommand "ld-lsb-compat" { } ( + '' + mkdir -p "$out/lib" + ln -sr "${pkgs.glibc}/lib/ld-linux-x86-64.so.2" "$out/lib/ld-lsb-x86-64.so.3" + '' + + lib.optionalString withQuesta '' + ln -sr "${pkgsi686Linux.glibc}/lib/ld-linux.so.2" "$out/lib/ld-lsb.so.3" + '' + )) + # quartus requirements + pkgs.glib + pkgs.libz # quartus vesion <= v20 + pkgs.libice + pkgs.libsm + pkgs.libxau + pkgs.libxdmcp + pkgs.libxscrnsaver + pkgs.libudev0-shim + pkgs.bzip2 + pkgs.brotli + pkgs.expat + pkgs.dbus + # qsys requirements + pkgs.libxtst + pkgs.libxi + pkgs.dejavu_fonts + pkgs.gnumake + ]; # Also support 32-bit executables used by simulator. multiArch = withQuesta; @@ -76,26 +75,25 @@ buildFHSEnv rec { # these libs are installed as 64 bit, plus as 32 bit when multiArch is true multiPkgs = pkgs: - with pkgs; let # This seems ugly - can we override `libpng = libpng12` for all `pkgs`? - freetype = pkgs.freetype.override { libpng = libpng12; }; + freetype = pkgs.freetype.override { libpng = pkgs.libpng12; }; fontconfig = pkgs.fontconfig.override { inherit freetype; }; libXft = pkgs.libxft.override { inherit freetype fontconfig; }; in [ # questa requirements - libxml2 - ncurses5 - unixodbc + pkgs.libxml2 + pkgs.ncurses5 + pkgs.unixodbc libXft # common requirements freetype fontconfig - libx11 - libxext - libxrender - libxcrypt-legacy + pkgs.libx11 + pkgs.libxext + pkgs.libxrender + pkgs.libxcrypt-legacy ]; extraInstallCommands = '' diff --git a/pkgs/quartus/sources/helpers.nix b/pkgs/quartus/sources/helpers.nix index 5247c4f..528e7e3 100644 --- a/pkgs/quartus/sources/helpers.nix +++ b/pkgs/quartus/sources/helpers.nix @@ -28,6 +28,13 @@ lib: rec { x // { inherit variant; + quartusInstaller = + { + lite = "QuartusLiteSetup"; + standard = "QuartusSetup"; + pro = "QuartusProSetup"; + } + .${variant}; loginUrl = let versionString = builtins.concatStringsSep "-" ( diff --git a/pkgs/quartus/sources/lite.nix b/pkgs/quartus/sources/lite.nix index 8068251..d974dfc 100644 --- a/pkgs/quartus/sources/lite.nix +++ b/pkgs/quartus/sources/lite.nix @@ -4,7 +4,6 @@ let sources = helpers.mkVariants "lite" [ { version = "23.1std.1.993"; - quartusInstaller = "QuartusLiteSetup"; defaultInstalls = [ ]; defaultDevices = [ "cyclonev" ]; installers = { @@ -22,7 +21,6 @@ let } { version = "24.1std.0.1077"; - quartusInstaller = "QuartusLiteSetup"; defaultInstalls = [ ]; defaultDevices = [ "cyclonev" ]; installers = { @@ -40,7 +38,6 @@ let } { version = "25.1std.0.1129"; - quartusInstaller = "QuartusLiteSetup"; defaultInstalls = [ ]; defaultDevices = [ "cyclonev" ]; installers = { diff --git a/pkgs/quartus/sources/pro.nix b/pkgs/quartus/sources/pro.nix index f551b72..780652d 100644 --- a/pkgs/quartus/sources/pro.nix +++ b/pkgs/quartus/sources/pro.nix @@ -21,7 +21,6 @@ let sources = helpers.mkVariants "pro" [ { version = "23.4.0.79"; - quartusInstaller = "QuartusProSetup"; defaultInstalls = [ ]; defaultDevices = [ "cyclone10gx" ]; installers = { @@ -40,7 +39,6 @@ let } { version = "24.3.0.212"; - quartusInstaller = "QuartusProSetup"; defaultInstalls = [ ]; defaultDevices = [ "cyclone10gx" ]; installers = { @@ -70,7 +68,6 @@ let } { version = "25.1.0.129"; - quartusInstaller = "QuartusProSetup"; defaultInstalls = [ ]; defaultDevices = [ "cyclone10gx" ]; installers = { @@ -104,7 +101,6 @@ let } { version = "25.3.0.109"; - quartusInstaller = "QuartusProSetup"; defaultInstalls = [ ]; defaultDevices = [ "cyclone10gx" ]; # The only device family that doesn't need a paid license installers = { @@ -135,6 +131,42 @@ let stratix10 = "sha256-+CaEa1L8xviW405hbOgb6vOAHYAtVPFqXQZJQcLnP1Q="; }; } + rec { + version = "26.1.1.130"; + bundledDevices = [ + "cyclone10gx" + "arria10" + ]; + defaultInstalls = [ ]; + defaultDevices = bundledDevices; + installers = { + QuartusProSetup = "sha256-mGOUMi34xj3ihTyvI+mfXzyN6Kr88nkY2BGW1SyYxsI="; + QuestaSetup = "sha256-7ByofPkbCSCsNGlH+qI1oNODg4qodZ4N8VHzumyr9do="; + }; + installerParts.QuartusProSetup.QuartusProSetup-part2 = { + hash = "sha256-NOuEh43L79wmJSAUqIItIa9YRrpCVxcgTnxbvdOEpAM="; + suffix = ""; + }; + devices = + let + agilex_common = "sha256-u+WKS7akL5PiaidGAqai18FZ3fs7/XYMmVQHpFUQQkw="; + in + { + agilex3 = { + inherit agilex_common; + agilex3 = "sha256-F/ULFL6zQFuAguZoXDj3RCYEDf2aBMO1IJ6urUSZbpI="; + }; + agilex5 = { + inherit agilex_common; + agilex5 = "sha256-jl/E8RAd0BKphuXc0z8V4FxMH/t0uz3xcUevWkVD0Yg="; + }; + agilex7 = { + inherit agilex_common; + agilex7 = "sha256-vpl7xsoJTCwgVjp5P0BiI7TYbX0AB544oI5m7IApvgQ="; + }; + stratix10 = "sha256-scqx+yQpxkjdcoAFIAyiWu2L0sJZMzgMQ+yq/kSgNEI="; + }; + } ]; in helpers.setupSources sources diff --git a/pkgs/quartus/sources/standard.nix b/pkgs/quartus/sources/standard.nix index 7204346..822f639 100644 --- a/pkgs/quartus/sources/standard.nix +++ b/pkgs/quartus/sources/standard.nix @@ -4,7 +4,6 @@ let sources = helpers.mkVariants "standard" [ { version = "23.1std.1.993"; - quartusInstaller = "QuartusSetup"; defaultInstalls = [ ]; defaultDevices = [ "cyclonev" ]; installers = { -- 2.51.2