diff --git a/README.md b/README.md index 53455a7..781a00e 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,23 @@ # nix-quartus -Nix Expressions for Altera(Intel) Quartus +Nix Expressions for Altera(Intel) Quartus. + +These expressions are based on the expressions for Quartus found in Bjørn +Forsman's [nixos-config repository](https://github.com/bjornfor/nixos-config) + +These packages use a (hopefully) recent pinned Nixpkgs rev, as specified in +`pinned-nixpkgs.nix`. They've been tested on x86_64 Linux. + +## Building + +Simply import the top-level expression for the desired Quartus version. For +example, to build the Lite Edition of Quartus Prime 18: + +``` +$ nix build "(import ./lite18.nix)" +``` + +To install the same version: + +``` +$ nix-env -i -E "_: import ./lite18.nix" +``` diff --git a/generic.nix b/generic.nix new file mode 100644 index 0000000..f43cac6 --- /dev/null +++ b/generic.nix @@ -0,0 +1,453 @@ +{ stdenv, fetchurl, utillinux, file, bash, glibc, pkgsi686Linux, writeScript +, nukeReferences, glibcLocales, libfaketime, coreutils, gnugrep, gnused, proot +# Runtime dependencies +, zlib, glib, libpng12, freetype, libSM, libICE, libXrender, fontconfig +, libXext, libX11, libXtst, gtk2, bzip2, libelf +}: + +{ baseName +, prettyName ? baseName +, version +, components ? [] +, updateComponents ? [] + +# Set to true for the old installers that are 32-bit only +, is32bitPackage ? false + +# There are .so files inside .jar files bundled with Quartus that lack RPATH +# directives. This breaks starting e.g. eclipse-nios2: +# +# java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: +# $HOME/.altera.sbt4e/16.1.0.196-linux64/configuration/org.eclipse.osgi/bundles/404/1/.cp/libswt-pi-gtk-4335.so: libXtst.so.6: cannot open shared object file: No such file or directory +# no swt-pi-gtk in java.library.path +# $HOME/.swt/lib/linux/x86_64/libswt-pi-gtk-4335.so: libXtst.so.6: cannot open shared object file: No such file or directory +# Can't load library: $HOME/.swt/lib/linux/x86_64/libswt-pi-gtk.so +# +# Although we _could_ fixup these .so files that live inside .jar files (or +# find all java interpreters and specify "-Djava.library.path=" on their +# command line), I don't think it's worth it. Quartus *itself* sets +# LD_LIBRARY_PATH, thus breaking spawning firefox from it, so I see no reason +# we shouldn't be equally lazy. +, wrapWithLdLibraryPath ? true +}: + +let + # Somewhere between NixOS 16.09 and 17.03 (for instance, commit 9e6eec201b) + # the glibc attribute lacked $out/lib{,64}. The glibc_lib attribute below + # helped when bisecting build issues between 16.03 and 17.03. + glibc_lib = + if glibc ? out then glibc.out else glibc; + glibc_lib32 = + if pkgsi686Linux.glibc ? out then pkgsi686Linux.glibc.out else pkgsi686Linux.glibc; + + # Using glibc>=2.25 causes the Quartus*Setup*run installer to hang. + # Use 2.24 instead. + commonGlibcAttrs224 = rec { + name = "glibc-${version}"; + version = "2.24"; + src = fetchurl { + url = "http://ftpmirror.gnu.org/glibc/${name}.tar.xz"; + sha256 = "1lxmprg9gm73gvafxd503x70z32phwjzcy74i0adfi6ixzla7m4r"; + }; + }; + + # Backport upstream patch to fix build against nixpkgs-18.09. + glibc_lib_for_installer = glibc_lib.overrideAttrs (oldAttrs: + commonGlibcAttrs224 // { patches = [ ./patches/glibc/0001-Avoid-.symver-on-common-symbols-BZ-21666.patch ]; } + ); + glibc_lib32_for_installer = glibc_lib32.overrideAttrs (oldAttrs: + commonGlibcAttrs224 // { patches = [ ./patches/glibc/0001-Avoid-.symver-on-common-symbols-BZ-21666.patch ]; } + ); + + # Keep in sync with runtimeLibPath64 + # (with pkgsi686Linux; [ .. ] doesn't bind strongly enough.) + runtimeLibPath32 = + stdenv.lib.makeLibraryPath + [ pkgsi686Linux.zlib pkgsi686Linux.glib pkgsi686Linux.libpng12 + pkgsi686Linux.freetype pkgsi686Linux.xorg.libSM pkgsi686Linux.xorg.libICE + pkgsi686Linux.xorg.libXrender pkgsi686Linux.fontconfig.lib + pkgsi686Linux.xorg.libXext pkgsi686Linux.xorg.libX11 pkgsi686Linux.xorg.libXtst + pkgsi686Linux.gtk2 pkgsi686Linux.bzip2.out pkgsi686Linux.libelf + pkgsi686Linux.stdenv.cc.cc.lib + ]; + + # Keep in sync with runtimeLibPath32 + runtimeLibPath64 = + stdenv.lib.makeLibraryPath + [ zlib glib libpng12 freetype libSM libICE libXrender fontconfig.lib + libXext libX11 libXtst gtk2 bzip2.out libelf + stdenv.cc.cc.lib + ]; + + runtimeLibPath = + if is32bitPackage then runtimeLibPath32 else runtimeLibPath64; + + runtimeBinPath = stdenv.lib.makeBinPath + [ coreutils gnugrep gnused glibc proot ]; + + setup-chroot-and-exec = writeScript "setup-chroot-and-exec" + ('' + #!${bash}/bin/sh + chrootdir=chroot # relative to the current directory + mkdir -p "$chrootdir"/host + mkdir -p "$chrootdir"/proc + mkdir -p "$chrootdir"/nix + mkdir -p "$chrootdir"/tmp + mkdir -p "$chrootdir"/dev + mkdir -p "$chrootdir"/lib + mkdir -p "$chrootdir"/lib64 + mkdir -p "$chrootdir"/bin + ${utillinux}/bin/mount --rbind / "$chrootdir"/host + ${utillinux}/bin/mount --rbind /proc "$chrootdir"/proc + ${utillinux}/bin/mount --rbind /nix "$chrootdir"/nix + ${utillinux}/bin/mount --rbind /tmp "$chrootdir"/tmp + ${utillinux}/bin/mount --rbind /dev "$chrootdir"/dev + '' + (if is32bitPackage then '' + ${utillinux}/bin/mount --rbind "${glibc_lib32_for_installer}"/lib "$chrootdir"/lib + '' else '' + ${utillinux}/bin/mount --rbind "${glibc_lib_for_installer}"/lib64 "$chrootdir"/lib64 + '') + '' + ${utillinux}/bin/mount --rbind "${bash}"/bin "$chrootdir"/bin + chroot "$chrootdir" "$@" + ''); + + # buildFHSUserEnv from nixpkgs tries to mount a few directories that are not + # available in sandboxed Nix builds (/sys, /run), hence we have our own + # slimmed down variant. + run-in-fhs-env = writeScript "run-in-fhs-env" + '' + #!${bash}/bin/sh + if [ "$*" = "" ]; then + echo "Usage: run-in-fhs-env [ARGS...]" + exit 1 + fi + "${utillinux}/bin/unshare" -r -U -m "${setup-chroot-and-exec}" "$@" + ''; + + mkInstallersDir = srcs: + stdenv.mkDerivation rec { + name = "${baseName}-installers"; + inherit srcs version; + buildCommand = + '' + # The files are copied, not symlinked, because + # - We must add execute bit to *.run files + # - Quartus*Setup*.run fails to use the *.qdz files if they are symlinks. + # Example error message (which doesn't abort the installer!): + # Error copying file from /nix/store/HASH1-altera-quartus-prime-lite-installers-16.1.0.196/cyclonev-16.1.0.196.qdz/cyclonev-16.1.0.196.qdz to /nix/store/HASH2-altera-quartus-prime-lite-16.1.0.196/cyclonev-16.1.0.196.qdz: + # /nix/store/HASH1-altera-quartus-prime-lite-installers-16.1.0.196/cyclonev-16.1.0.196.qdz/cyclonev-16.1.0.196.qdz does not exist + # Abort + # Unable to copy file + set -x + + mkdir -p "$out" + ${stdenv.lib.concatStringsSep "\n" + (map + (p: '' + cp "${p}" "$out/$(stripHash "${p}")" + '') + srcs + ) + } + for f in $out/*run; do + [ -e "$f" ] && chmod +x "$f" + done + ''; + }; + + componentInstallers = mkInstallersDir components; + + updateComponentInstallers = mkInstallersDir updateComponents; + + quartusUnwrapped = stdenv.mkDerivation rec { + name = "${baseName}-unwrapped-${version}"; + inherit version; + # srcs is for keeping track of inputs used for the build. + srcs = components ++ updateComponents; + buildInputs = [ file nukeReferences ]; + + # Fix this: + # /nix/store/...-altera-quartus-ii-web-13.1.4.182/quartus/adm/qenv.sh: line 83: \ + # warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory + LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive"; + + # Prebuilt binaries need special treatment + dontStrip = true; + dontPatchELF = true; + # Fix "RPATH of binary X contains a forbidden reference to /build" issue. + # (These are prebuilt binaries, not much we can do.) + noAuditTmpdir = true; + + configurePhase = "true"; + buildPhase = "true"; + unpackPhase = "true"; + + # Quartus' setup.sh (from the all-in-one-installers) doesn't fit our needs + # (we want automatic and distro-agnostic install), so call the actual setup + # program directly instead. + # + # Quartus*Setup*.run files are statically linked ELF executables that run + # open("/lib64/ld-linux-x86-64.so.2", ...) (or "/lib/ld-linux.so.2" for + # 32-bit versions) . That obviously doesn't work in sandboxed Nix builds. + # + # Things that do not work: + # * patchelf the installer (there is no .interp section in static ELF) + # * dynamic linker tricks (again, static ELF) + # * proot (the installer somehow detects something is wrong and aborts) + # + # We need bigger guns: user namespaces and chroot. That's how we make /lib64/ + # available to the installer. The installer installs dynamically linked ELF + # files, so those we can fixup with usual tools. + # + # For runtime, injecting (or wrapping with) LD_LIBRARY_PATH is easier, but it + # messes with the environment for all child processes. We take the less + # invasive approach here, patchelf + RPATH. Unfortunately, Quartus itself + # uses LD_LIBRARY_PATH in its wrapper scripts. This cause e.g. firefox to + # fail due to LD_LIBRARY_PATH pulling in wrong libraries for it (happens if + # clicking any URL in Quartus). + installPhase = '' + set -x + + run_quartus_installer() + { + installer="$1" + if [ ! -x "$installer" ]; then + echo "ERROR: \"$installer\" either doesn't exist or is not executable" + exit 1 + fi + maybe_accept_eula="${if stdenv.lib.versionAtLeast version "17.1" then "--accept_eula 1" else ""}" + echo "### ${run-in-fhs-env} $installer --mode unattended --installdir $out" $maybe_accept_eula + "${run-in-fhs-env}" "$installer" --mode unattended --installdir "$out" $maybe_accept_eula + echo "...done" + } + + echo "Running Quartus Setup (in FHS sandbox)..." + run_quartus_installer "$(echo "${componentInstallers}"/Quartus*Setup*)" + + ${stdenv.lib.optionalString (updateComponents != []) '' + echo "Running Quartus Update (in FHS sandbox)..." + run_quartus_installer "$(echo "${updateComponentInstallers}"/Quartus*Setup*)" + ''} + + echo "Removing unneeded \"uninstall\" binaries (saves $(du -sh "$out"/uninstall | cut -f1))" + rm -rf "$out"/uninstall + + echo "Prevent retaining a runtime dependency on the installer binaries (saves $(du -sh "${componentInstallers}" | cut -f1) + $(du -sh "${updateComponentInstallers}" | cut -f1))" + nuke-refs "$out/logs/"* + + echo "Fixing ELF interpreter paths with patchelf" + find "$out" -type f | while read f; do + case "$f" in + *.debug) continue;; + esac + # A few files are read-only. Make them writeable for patchelf. (Nix + # will make all files read-only after the build.) + chmod +w "$f" + magic=$(file "$f") || { echo "file \"$f\" failed"; exit 1; } + case "$magic" in + *ELF*dynamically\ linked*) + orig_rpath=$(patchelf --print-rpath "$f") || { echo "FAILED: patchelf --print-rpath $f"; exit 1; } + # Take care not to add ':' at start or end of RPATH, because + # that is the same as '.' (current directory), and that's + # insecure. + if [ "$orig_rpath" != "" ]; then + orig_rpath="$orig_rpath:" + fi + new_rpath="$orig_rpath${runtimeLibPath}" + case "$magic" in + *ELF*pie\ executable*|*ELF*shared\ object*x86-64*) + patchelf --set-rpath "$new_rpath" "$f" || { echo "FAILED: patchelf --set-rpath $f"; exit 1; } + ;; + *ELF*executable*) + interp=$(patchelf --print-interpreter "$f") || { echo "FAILED: patchelf --print-interpreter $f"; exit 1; } + # Note the LSB interpreters, required by some files + case "$interp" in + /lib64/ld-linux-x86-64.so.2|/lib64/ld-lsb-x86-64.so.3) + new_interp=$(cat "$NIX_CC"/nix-support/dynamic-linker) + ;; + /lib/ld-linux.so.2|/lib/ld-lsb.so.3) + new_interp="${glibc_lib32}/lib/ld-linux.so.2" + ;; + /lib/ld-linux-armhf.so.3|/lib64/ld64.so.1|/lib64/ld64.so.2) + # Ignore ARM/ppc64/ppc64le executables, they + # are not meant to be run on the build machine. + # Example files: + # altera-quartus-prime-lite-15.1.0.185/hld/host/arm32/bin/aocl-binedit + # altera-quartus-prime-lite-15.1.0.185/hld/host/ppc64/bin/aocl-binedit + # altera-quartus-prime-lite-15.1.0.185/hld/host/ppc64le/bin/aocl-binedit + continue + ;; + /usr/lib/ld.so.1) + echo "Unclear if this will work?" + new_interp="${glibc_lib32}/lib/ld-linux.so.2" + ;; + *) + echo "FIXME: unhandled interpreter \"$interp\" in $f" + exit 1 + ;; + esac + test -f "$new_interp" || { echo "$new_interp is missing"; exit 1; } + patchelf --set-interpreter "$new_interp" \ + --set-rpath "$new_rpath" "$f" || { echo "FAILED: patchelf --set-interpreter $new_interp --set-rpath $new_rpath $f"; exit 1; } + ;; + esac + ;; + *ELF*statically\ linked*) + echo "WARN: $f is statically linked. Needs fixup?" + ;; + esac + done + + # Modelsim is optional + f="$out"/modelsim_ase/vco + if [ -f "$f" ]; then + echo "Fix hardcoded \"/bin/ls\" in .../modelsim_ase/vco" + sed -i -e "s,/bin/ls,ls," "$f" + + echo "Fix support for Linux 4.x in .../modelsim_ase/vco" + sed -i -e "/case \$utype in/a 4.[0-9]*) vco=\"linux\" ;;" "$f" + fi + ''; + }; + +in + +stdenv.mkDerivation rec { + name = "${baseName}-${version}"; + # version and srcs are unused by this derivation, but keep them as metadata + # (for users). + inherit (quartusUnwrapped) version srcs; + buildCommand = '' + set -x + + # Provide convenience wrappers in $out/bin, so that the tools can be + # started directly from PATH. Plain symlinks don't work, due to assumptions + # of resources relative to arg0. + wrap() + { + dest="$out/bin/$(basename "$1")" + if [ -f "$dest" ]; then + echo "ERROR: $dest already exist" + exit 1 + fi + cat > "$dest" << EOF + #!${bash}/bin/sh + + # Some tools seem to forget sourcing their environment setup file (e.g + # elf2hex), so help them by setting QUARTUS_ROOTDIR (and *OVERRIDE). + # (Perhaps these tools were never tested _not_ being started from Quartus + # IDE?) + export QUARTUS_ROOTDIR="${quartusUnwrapped}/quartus" + export QUARTUS_ROOTDIR_OVERRIDE="\$QUARTUS_ROOTDIR" + + # To prevent e.g. "alt-file-convert" from aborting due to not being able to + # write to __pycache__ in the (read-only) nix store. + export PYTHONDONTWRITEBYTECODE=1 + + ${stdenv.lib.optionalString wrapWithLdLibraryPath '' + if [ "x\$LD_LIBRARY_PATH" != x ]; then + export LD_LIBRARY_PATH="${runtimeLibPath}:\$LD_LIBRARY_PATH" + else + export LD_LIBRARY_PATH="${runtimeLibPath}" + fi + ''} + + # Inject path to known tools. This is important not only for having a + # complete package (all deps), but also to ensure that LD_PRELOAD etc. + # won't break the CLI tools. (Think non-NixOS setups.) + export PATH="${runtimeBinPath}:\$PATH" + + # Check if we need to isolate ourself from /bin/sh. This is to work around + # a long standing bug in nixpkgs that glibc system() calls /bin/sh. The + # reasoning behind the test is that Nix tools don't depend on things in + # /lib. The test should be positive only on non-sandboxed, non-NixOS builds. + bin_sh_is_clean=1 + if ldd /bin/sh | grep -q "^\s*/lib"; then + bin_sh_is_clean=0 + fi + + # Implement the SOURCE_DATE_EPOCH specification, for reproducible builds: + # https://reproducible-builds.org/specs/source-date-epoch + if [ "x\$SOURCE_DATE_EPOCH" != x ]; then + # Create a minimal "sandbox" with proot, or else programs running + # /bin/sh will fail because we're setting LD_PRELOAD etc. + if [ \$bin_sh_is_clean -eq 0 ]; then + maybe_proot_cmd="proot -b ${bash}/bin/sh:/bin/sh" + # Work around bug with linux 4.8.4+ (costs some performance, but + # prevents breakage). + export PROOT_NO_SECCOMP=1 + fi + # Prepare LD_LIBRARY_PATH, LD_PRELOAD + if [ "x\$LD_LIBRARY_PATH" != x ]; then + export LD_LIBRARY_PATH="${libfaketime}/lib:\$LD_LIBRARY_PATH" + else + export LD_LIBRARY_PATH="${libfaketime}/lib" + fi + if [ "x${toString is32bitPackage}" = "x${toString true}" ]; then + export LD_LIBRARY_PATH="${pkgsi686Linux.libfaketime}/lib:\$LD_LIBRARY_PATH" + fi + if [ "x\$LD_PRELOAD" != x ]; then + export LD_PRELOAD="libfaketime.so.1:\$LD_PRELOAD" + else + export LD_PRELOAD=libfaketime.so.1 + fi + # Set the time to SOURCE_DATE_EPOCH + export FAKETIME_FMT="%s" + export FAKETIME=\$(date +%s -d @\$SOURCE_DATE_EPOCH) + fi + + # Fix this: + # /nix/store/...-altera-quartus-ii-web-13.1.4.182/quartus/adm/qenv.sh: line 83: \ + # warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory + export LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive" + + exec \$maybe_proot_cmd "$1" "\$@" + EOF + chmod +x "$dest" + } + + echo "Creating top-level bin/ directory with wrappers for common tools" + mkdir -p "$out/bin" + for p in "${quartusUnwrapped}/"*"/bin/"*; do + test -f "$p" || continue + wrap "$p" + done + + echo "Installing Desktop file..." + mkdir -p "$out/share/applications" + f="$out"/share/applications/quartus.desktop + cat >> "$f" << EOF + [Desktop Entry] + Type=Application + Name=${prettyName} ${version} + Comment=${prettyName} ${version} + Icon=${quartusUnwrapped}/quartus/adm/quartusii.png + Exec=$out/bin/quartus + Terminal=false + Path=$out + EOF + + # udev rules based on + # https://www.intel.com/content/www/us/en/programmable/support/support-resources/download/drivers/dri-usb_b-lnx.html + echo "Installing udev rules" + mkdir -p "$out/lib/udev/rules.d" + cat > "$out/lib/udev/rules.d/51-usbblaster.rules" << EOF + # USB-Blaster / Intel FPGA Download Cable + SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6001", MODE="0666" + SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6002", MODE="0666" + SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6003", MODE="0666" + + # USB-Blaster II / Intel FPGA Download Cable II + SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6010", MODE="0666" + SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6810", MODE="0666" + EOF + ''; + + meta = with stdenv.lib; { + description = "Development tools for Altera FPGA, CPLD and SoC designs"; + homepage = https://www.altera.com/; + license = licenses.unfree; + platforms = [ "x86_64-linux" ]; + maintainers = [ maintainers.bjornfor ]; + }; +} diff --git a/lite18.nix b/lite18.nix new file mode 100644 index 0000000..838106c --- /dev/null +++ b/lite18.nix @@ -0,0 +1,2 @@ +let nixpkgs = import ./pinned-nixpkgs.nix; +in (nixpkgs.callPackage ./quartus-versions.nix {}).altera-quartus-prime-lite-18 diff --git a/patches/glibc/0001-Avoid-.symver-on-common-symbols-BZ-21666.patch b/patches/glibc/0001-Avoid-.symver-on-common-symbols-BZ-21666.patch new file mode 100644 index 0000000..dd1f3e3 --- /dev/null +++ b/patches/glibc/0001-Avoid-.symver-on-common-symbols-BZ-21666.patch @@ -0,0 +1,66 @@ +From 388b4f1a02f3a801965028bbfcd48d905638b797 Mon Sep 17 00:00:00 2001 +From: "H.J. Lu" +Date: Fri, 23 Jun 2017 14:38:46 -0700 +Subject: [PATCH] Avoid .symver on common symbols [BZ #21666] + +The .symver directive on common symbol just creates a new common symbol, +not an alias and the newer assembler with the bug fix for + +https://sourceware.org/bugzilla/show_bug.cgi?id=21661 + +will issue an error. Before the fix, we got + +$ readelf -sW libc.so | grep "loc[12s]" + 5109: 00000000003a0608 8 OBJECT LOCAL DEFAULT 36 loc1 + 5188: 00000000003a0610 8 OBJECT LOCAL DEFAULT 36 loc2 + 5455: 00000000003a0618 8 OBJECT LOCAL DEFAULT 36 locs + 6575: 00000000003a05f0 8 OBJECT GLOBAL DEFAULT 36 locs@GLIBC_2.2.5 + 7156: 00000000003a05f8 8 OBJECT GLOBAL DEFAULT 36 loc1@GLIBC_2.2.5 + 7312: 00000000003a0600 8 OBJECT GLOBAL DEFAULT 36 loc2@GLIBC_2.2.5 + +in libc.so. The versioned loc1, loc2 and locs have the wrong addresses. +After the fix, we got + +$ readelf -sW libc.so | grep "loc[12s]" + 6570: 000000000039e3b8 8 OBJECT GLOBAL DEFAULT 34 locs@GLIBC_2.2.5 + 7151: 000000000039e3c8 8 OBJECT GLOBAL DEFAULT 34 loc1@GLIBC_2.2.5 + 7307: 000000000039e3c0 8 OBJECT GLOBAL DEFAULT 34 loc2@GLIBC_2.2.5 + + [BZ #21666] + * misc/regexp.c (loc1): Add __attribute__ ((nocommon)); + (loc2): Likewise. + (locs): Likewise. +--- + ChangeLog | 7 +++++++ + misc/regexp.c | 9 +++++---- + 2 files changed, 12 insertions(+), 4 deletions(-) + +[Bjørn Forsman: remove the ChangeLog hunk to ease backporting.] + +diff --git a/misc/regexp.c b/misc/regexp.c +index 19d76c0c37..eaea7c3b89 100644 +--- a/misc/regexp.c ++++ b/misc/regexp.c +@@ -29,14 +29,15 @@ + + #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_23) + +-/* Define the variables used for the interface. */ +-char *loc1; +-char *loc2; ++/* Define the variables used for the interface. Avoid .symver on common ++ symbol, which just creates a new common symbol, not an alias. */ ++char *loc1 __attribute__ ((nocommon)); ++char *loc2 __attribute__ ((nocommon)); + compat_symbol (libc, loc1, loc1, GLIBC_2_0); + compat_symbol (libc, loc2, loc2, GLIBC_2_0); + + /* Although we do not support the use we define this variable as well. */ +-char *locs; ++char *locs __attribute__ ((nocommon)); + compat_symbol (libc, locs, locs, GLIBC_2_0); + + +-- +2.19.2 + diff --git a/pinned-nixpkgs.nix b/pinned-nixpkgs.nix new file mode 100644 index 0000000..d50e28b --- /dev/null +++ b/pinned-nixpkgs.nix @@ -0,0 +1,18 @@ +let fetcher = { owner + , repo + , rev + , sha256 + }: + builtins.fetchTarball + { + inherit sha256; + url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; + }; + nixpkgs-src = fetcher + { + owner = "nixos"; + repo = "nixpkgs-channels"; + rev = "cb0e20d6db96fe09a501076c7a2c265359982814"; + sha256 = "0d9pkbax0phh392j6pzkn365wbsgd0h1cmm58rwq8zf9lb0pgkg2"; + }; +in import nixpkgs-src {} diff --git a/quartus-versions.nix b/quartus-versions.nix new file mode 100644 index 0000000..e5aa040 --- /dev/null +++ b/quartus-versions.nix @@ -0,0 +1,78 @@ +{ stdenv, fetchurl, utillinux, file, bash, glibc, pkgsi686Linux, writeScript +, nukeReferences, glibcLocales, libfaketime, coreutils, gnugrep, gnused, proot +, requireFile +# Runtime libraries: +, zlib, glib, libpng12, freetype, libSM, libICE, libXrender, fontconfig +, libXext, libX11, libXtst, gtk2, bzip2, libelf +}: + +let + + sources = import ./sources.nix { inherit fetchurl requireFile; }; + + buildQuartus = import ./generic.nix { + inherit + stdenv fetchurl utillinux file bash glibc pkgsi686Linux writeScript + nukeReferences glibcLocales libfaketime coreutils gnugrep gnused proot + # Runtime libraries: + zlib glib libpng12 freetype libSM libICE libXrender fontconfig + libXext libX11 libXtst gtk2 bzip2 libelf; + }; + + mkCommonQuartus = srcAttrs: + buildQuartus { + inherit (srcAttrs) baseName prettyName is32bitPackage; + version = srcAttrs.version; + components = with srcAttrs.components; [ + quartus cyclone cyclonev + ]; + #updateComponents = with srcAttrs.updates.components; [ + # quartus + #]; + }; + +in rec { + + inherit sources; + + altera-quartus-ii-web-13 = + mkCommonQuartus sources.v13.web_edition; + + altera-quartus-ii-subscription-13 = + mkCommonQuartus sources.v13.subscription_edition; + + altera-quartus-ii-web-14 = + mkCommonQuartus sources.v14.web_edition; + + altera-quartus-ii-subscription-14 = + mkCommonQuartus sources.v14.subscription_edition; + + altera-quartus-prime-lite-15 = + mkCommonQuartus sources.v15.lite_edition; + + altera-quartus-prime-standard-15 = + mkCommonQuartus sources.v15.standard_edition; + + altera-quartus-prime-lite-16 = + mkCommonQuartus sources.v16.lite_edition; + + altera-quartus-prime-standard-16 = + mkCommonQuartus sources.v16.standard_edition; + + altera-quartus-prime-lite-17 = + mkCommonQuartus sources.v17.lite_edition; + + altera-quartus-prime-standard-17 = + mkCommonQuartus sources.v17.standard_edition; + + altera-quartus-prime-lite-18 = + mkCommonQuartus sources.v18.lite_edition; + + altera-quartus-prime-standard-18 = + mkCommonQuartus sources.v16.standard_edition; + + # Aliases to latest versions + altera-quartus-prime-lite = altera-quartus-prime-lite-18; + altera-quartus-prime-standard = altera-quartus-prime-standard-18; + +} diff --git a/sources.nix b/sources.nix new file mode 100644 index 0000000..e558b26 --- /dev/null +++ b/sources.nix @@ -0,0 +1,926 @@ +{ fetchurl, requireFile }: + +# You can find information about the Quartus software at https://dl.altera.com/. +# To be able able to download anything you must fill out a registration form. +# So the URLs below might not be "stable". (It's probably a good idea to backup +# the downloaded sources.) + +# Even when browsing the encrypted HTTPS site (https://dl.altera.com/) the +# download links are given as unencrypted http://. Trying to use https:// +# instead results in a browser warning, because the certificate is not trusted +# (checked 2017-08). + +# Old versions of Quartus were named "Quartus II" and came in two editions: +# * web (free) +# * subscription (paid license) +# +# New versions (since 15.1) are named "Quartus Prime" and come in these +# editions: +# * lite (free, same as old web +# * standard (paid license, similar to subscription) +# * pro (paid license, similar to subscription) +# +# Summary: +# free = web | lite +# paid1 = subscription | standard +# paid2 = pro # exists since 15.1 + +# Comments like +# # Size: 1.5 GB MD5: 672AD34728F7173AC8AECFB2C7A10484 +# come from dl.altera.com. Nix doesn't consider md5 secure, so we use sha256 +# instead. Use a human to verify sha256 -> md5 sums. For example, this command +# outputs the md5 sums for the Quartus Prime 16 Standard Edition components, as +# is, in the nix store: +# $ nix-build -A altera-quartuses.sources.v16.standard_edition | while read f; do md5sum "$f"; done + +let requireQuartus = + { name + , sha256 + }: requireFile + { name = name; + sha256 = sha256; + message = '' + Download the quartus artifact ${name} from Intel's FPGA download + center, then add it to the store with: + + nix-store --add-fixed sha256 ${name} + ''; + }; +in rec { + + v13 = rec { + recurseForDerivations = true; + version = "13.0.1.232"; + is32bitPackage = true; + baseUrl = "http://download.altera.com/akdlm/software/acdsinst/13.1/162/ib_installers"; + + web_edition = { + recurseForDerivations = true; + baseName = "altera-quartus-ii-web"; + prettyName = "Quartus II Web Edition"; + # inherit version is32bitPackage updates; + inherit version is32bitPackage; + components = { + recurseForDerivations = true; + quartus = requireQuartus + { + name = "QuartusSetupWeb-${version}.run"; + sha256 = "7dd7305cec54949cdef85ae12c7a30a752a68136175a32ed853842c3a31636bc"; + }; + modelsim = requireQuartus { + name = "ModelSimSetup-${version}.run"; + sha256 = "17b1f293e16f1940586c5130f6323fe35576414f7f090590afc11f488572d5b5"; + }; + arria = requireQuartus { + name = "arria_web-${version}.qdz"; + sha256 = "201c6772c53701f4d13d15e21f406c4ca839ef3aa1133409efe611d6e9109251"; + }; + cyclone = requireQuartus { + name = "cyclone_web-${version}.qdz"; + sha256 = "c91e31e148f30c37487c55ef8089764aef532f268fe54ec6682767c46b35ac24"; + }; + cyclonev = requireQuartus { + name = "cyclonev-${version}.qdz"; + sha256 = "0fa3b75b6eda1bb28f89559f8169a261b7d0b19503fbfe5b59ea6befa0c24969"; + }; + max = requireQuartus { + url = "max_web-${version}.qdz"; + sha256 = "0c479700766456773f0ed483966441ccfc633046bccf1dd473bef61b9528ea21"; + }; + }; + }; + + #subscription_edition = { + # recurseForDerivations = true; + # baseName = "altera-quartus-ii-subscription"; + # prettyName = "Quartus II Subscription Edition"; + # inherit version is32bitPackage updates; + # components = { + # recurseForDerivations = true; + # quartus = fetchurl { + # # Size: 1.8 GB MD5: 7FEFAA7DBA6BC42801D043AFCCC97AE5 + # url = "${baseUrl}/QuartusSetup-${version}.run"; + # sha256 = "000iwm44k77jf44skbl49fi3f0miqy33rshpp1sc9cl68cwfb9wg"; + # }; + # modelsim = fetchurl { + # # Size: 817.7 MB MD5: 45FEA341405603F5CF5CD1249BF90976 + # url = "${baseUrl}/ModelSimSetup-${version}.run"; + # sha256 = "0hy8s1238dbfgyypm416a0bc2hsqhqqy9vacq0lzqcnscfm87n3v"; + # }; + # arria = fetchurl { + # # Size: 595.6 MB MD5: 675B2B6BDCD7C892A59F84D8B4A5B6AF + # url = "${baseUrl}/arria-${version}.qdz"; + # sha256 = "1d29nwlvq8ia0sby73i6fqdcw7i3mzl4l018c9fk6h6wrhmnqxsm"; + # }; + # arriav = fetchurl { + # # Size: 1.2 GB MD5: 5CA879C0AD3E8E4933700153907D490F + # url = "${baseUrl}/arriav-${version}.qdz"; + # sha256 = "1x15an3dn38sl84cwksfjv83wcppbpjwjmrczgzc6kd76f3kx62c"; + # }; + # arriavgz = fetchurl { + # # Size: 1.4 GB MD5: C0B21B60D53BB8B6C8161A7B38005D0F + # url = "${baseUrl}/arriavgz-${version}.qdz"; + # sha256 = "1xxsva6dkfha7j79ssnrbd6awl7gimmjqpcv7xlbigxhjyq9i4jx"; + # }; + # cyclone = fetchurl { + # # Size: 548.4 MB MD5: 2252CD4E2CBA75018F9B1325929F69EF + # url = "${baseUrl}/cyclone-${version}.qdz"; + # sha256 = "1him8ra0m26y58zis9l8fz1cmx4lylfsqy410d2w4jrmgdsirnd4"; + # }; + # cyclonev = fetchurl { + # # Size: 810.4 MB MD5: 075BC842C2379B8D9B2CC74F9CAEDCB7 + # url = "${baseUrl}/cyclonev-${version}.qdz"; + # sha256 = "0ar8nfcn6d4lziixw16slnmic0dr3vmmz0l81kpj6accrdyyv70v"; + # }; + # max = fetchurl { + # # Size: 6.1 MB MD5: 253524637B52DA417107249344B7DF80 + # url = "${baseUrl}/max-${version}.qdz"; + # sha256 = "1v5rsy10jzpzn31qgzqsc2683iylvh4y902mxiimmzks21qwnb3j"; + # }; + # stratixiv = fetchurl { + # # Size: 633.7 MB MD5: 43AC8DF41B1A19087858A16716A39B96 + # url = "${baseUrl}/stratixiv-${version}.qdz"; + # sha256 = "1ckn8321zh3c2d7m6s6agsmjhp1p9fv68rw8rzapk65glavcjlzi"; + # }; + # stratixv = fetchurl { + # # Size: 1.9 GB MD5: B3975A8190C4C47C5C1C51528D949531 + # url = "${baseUrl}/stratixv-${version}.qdz"; + # sha256 = "1g4fr2n0113nx8rhg8pbvy4ahdxcdfllyymskvqcrbkizlc1f75y"; + # }; + # }; + #}; + + ## Updates are shared between editions. I.e. this update can be applied to + ## either web or subscription editions. + #updates = rec { + # recurseForDerivations = true; + # version = "13.1.4.182"; + # updateBaseUrl = "http://download.altera.com/akdlm/software/acdsinst/13.1.4/182/update"; + # components = { + # recurseForDerivations = true; + # quartus = fetchurl { + # # Size: 1.1 GB MD5: 172C8CD0EB631B988516F1182054F976 + # url = "${updateBaseUrl}/QuartusSetup-${version}.run"; + # sha256 = "0rs8dzr39nqzlvb6lizm803vyp5iqfx4axavrfd05d55ka1vbjnr"; + # }; + # }; + #}; + + }; + + v14 = rec { + recurseForDerivations = true; + version = "14.1.0.186"; + is32bitPackage = false; + baseUrl = "http://download.altera.com/akdlm/software/acdsinst/14.1/186/ib_installers"; + + web_edition = { + recurseForDerivations = true; + baseName = "altera-quartus-ii-web"; + prettyName = "Quartus II Web Edition"; + inherit version is32bitPackage updates; + components = { + recurseForDerivations = true; + quartus = fetchurl { + # Size: 1.5 GB MD5: A9237345C5725418A72363CDFF2556A7 + url = "${baseUrl}/QuartusSetupWeb-${version}-linux.run"; + sha256 = "0ngm9mib5dk8rivqrnds8ckp4p5yhh8i5yny4bhaixrf8jzibqk6"; + }; + modelsim = fetchurl { + # Size: 1.1 GB MD5: 70BE49AF8A26D4345937ED6BE4D568C8 + url = "${baseUrl}/ModelSimSetup-${version}-linux.run"; + sha256 = "0wdxcyhwrb4kcdcgw3s4md2wbmpzywwqgm3ajmmilcxdfz0xkijm"; + }; + arria = fetchurl { + # Size: 497.7 MB MD5: B329C8FCC2E1315B0E36C11AD41A23F7 + url = "${baseUrl}/arria_web-${version}.qdz"; + sha256 = "1x1dv2shlm0za8is9kk441vhlm3l61n5vqxmpn1ppvmy26dknlsp"; + }; + cyclone = fetchurl { + # Size: 462.7 MB MD5: 599819EBE4DDBFA0B622505B22432E86 + url = "${baseUrl}/cyclone-${version}.qdz"; + sha256 = "01wb8byxmiyaxazk9ww1bf7milmy5gnbvxw8ss1b50f2dc7724bm"; + }; + cyclonev = fetchurl { + # Size: 1.0 GB MD5: 446D7EE5999226CD3294F890A12C53CC + url = "${baseUrl}/cyclonev-${version}.qdz"; + sha256 = "1jvcnd71wpy7aldxpqjshc53rwmwzghbk5ka2qmjk206yhjb84sm"; + }; + max = fetchurl { + # Size: 11.3 MB MD5: C3EDC556AC9770DB2DD63706EECA2654 + url = "${baseUrl}/max-${version}.qdz"; + sha256 = "0p1b4gw53lj70nsic1ydh8fkp7bpz0a3kk7bs6zqvphzh37aqsyy"; + }; + max10 = fetchurl { + # Size: 289.0 MB MD5: 75F2D4AF1E847FC53AC6B619A35BD2CF + url = "${baseUrl}/max10-${version}.qdz"; + sha256 = "0s8lyy168d6979wpnfwfk0ffyq8bspm77xzdwdwbmv6xq8l9bpz3"; + }; + }; + }; + + subscription_edition = { + recurseForDerivations = true; + baseName = "altera-quartus-ii-subscription"; + prettyName = "Quartus II Subscription Edition"; + inherit version is32bitPackage updates; + components = { + recurseForDerivations = true; + quartus = fetchurl { + # Size: 2.2 GB MD5: 5A4696ED4AC2970897DC29714A7ECF5A + url = "${baseUrl}/QuartusSetup-${version}-linux.run"; + sha256 = "14k6jshw8nni393h2v9yians4cqmqx959gilpjqd3sbl2mi84nla"; + }; + modelsim = fetchurl { + # Size: 1.1 GB MD5: 70BE49AF8A26D4345937ED6BE4D568C8 + url = "${baseUrl}/ModelSimSetup-${version}-linux.run"; + sha256 = "0wdxcyhwrb4kcdcgw3s4md2wbmpzywwqgm3ajmmilcxdfz0xkijm"; + }; + arria = fetchurl { + # Size: 664.8 MB MD5: F1ACD701CC473FBC5683F4A0C6372211 + url = "${baseUrl}/arria-${version}.qdz"; + sha256 = "08iv0k46brb74pv9lyddmbnbsyisa0icccdvmixhzaygk7a7cv7n"; + }; + arriav = fetchurl { + # Size: 1.3 GB MD5: 87B7D003DAF8787CE62993E37054D043 + url = "${baseUrl}/arriav-${version}.qdz"; + sha256 = "0qq8y895qspqalbgp2h37rmj7kphwb4245nc6dyjf7v5wjxs485x"; + }; + arriavgz = fetchurl { + # Size: 1.9 GB MD5: A6F8A84CE77DDE6ABC4B50CC02A64DCB + url = "${baseUrl}/arriavgz-${version}.qdz"; + sha256 = "1qq03rkxv724yvl47vv0n7r9n091kc1gnsd0kls38a8knqc0mfdg"; + }; + arria10 = fetchurl { + # Size: 3.5 GB MD5: 8DC178E805F176BFD7119135B6A4B33E + url = "${baseUrl}/arria10-${version}.qdz"; + sha256 = "0r9q8w5prd32hj52796vaiqp7f62cqfifcf4cv0vdpnsk2mm4w8v"; + }; + cyclone = fetchurl { + # Size: 462.7 MB MD5: 599819EBE4DDBFA0B622505B22432E86 + url = "${baseUrl}/cyclone-${version}.qdz"; + sha256 = "01wb8byxmiyaxazk9ww1bf7milmy5gnbvxw8ss1b50f2dc7724bm"; + }; + cyclonev = fetchurl { + # Size: 1.0 GB MD5: 446D7EE5999226CD3294F890A12C53CC + url = "${baseUrl}/cyclonev-${version}.qdz"; + sha256 = "1jvcnd71wpy7aldxpqjshc53rwmwzghbk5ka2qmjk206yhjb84sm"; + }; + max = fetchurl { + # Size: 11.3 MB MD5: C3EDC556AC9770DB2DD63706EECA2654 + url = "${baseUrl}/max-${version}.qdz"; + sha256 = "0p1b4gw53lj70nsic1ydh8fkp7bpz0a3kk7bs6zqvphzh37aqsyy"; + }; + max10 = fetchurl { + # Size: 289.0 MB MD5: 75F2D4AF1E847FC53AC6B619A35BD2CF + url = "${baseUrl}/max10-${version}.qdz"; + sha256 = "0s8lyy168d6979wpnfwfk0ffyq8bspm77xzdwdwbmv6xq8l9bpz3"; + }; + stratixiv = fetchurl { + # Size: 535.0 MB MD5: 54260F8123D9AAFA5AD004D9D223520C + url = "${baseUrl}/stratixiv-${version}.qdz"; + sha256 = "1qfmkwnrqs41hchblpp7xqiqh80yb9r3fycgl5dpnm9gi5n6hn90"; + }; + stratixv = fetchurl { + # Size: 2.7 GB MD5: E7B7A4A83E723DA08D19C1DA2F559F4F + url = "${baseUrl}/stratixv-${version}.qdz"; + sha256 = "0pvnnaifdfbcwgdm0ks06sr8wf3n20692cykmxnkdy7g94lk0hyx"; + }; + }; + }; + + # Updates are shared between editions. I.e. this update can be applied to + # either web or subscription editions. + updates = rec { + recurseForDerivations = true; + version = "14.1.1.190"; + updateBaseUrl = "http://download.altera.com/akdlm/software/acdsinst/14.1.1/190/update"; + components = { + recurseForDerivations = true; + quartus = fetchurl { + # Size: 1.2 GB MD5: AA1623894DE38069635913DA2DE33167 + url = "${updateBaseUrl}/QuartusSetup-${version}-linux.run"; + sha256 = "11c1mss09v7sd6mm8sfy4vsxjssdk8xw6cwipnpsg2rrxvaz1v1i"; + }; + }; + }; + + }; + + v15 = rec { + recurseForDerivations = true; + version = "15.1.0.185"; + is32bitPackage = false; + baseUrl = "http://download.altera.com/akdlm/software/acdsinst/15.1/185/ib_installers"; + + lite_edition = { + recurseForDerivations = true; + baseName = "altera-quartus-prime-lite"; + prettyName = "Quartus Prime Lite Edition"; + inherit version is32bitPackage updates; + components = { + recurseForDerivations = true; + quartus = fetchurl { + # Size: 1.7 GB MD5: CC8BFDE25F57C2F05D1753882BC9607A + url = "${baseUrl}/QuartusLiteSetup-${version}-linux.run"; + sha256 = "0g66b97mr2snv5r1rqxxfrphz8bvkpdkccnrl2n7lcckiwj2baxf"; + }; + modelsim = fetchurl { + # Size: 1.1 GB MD5: 5A6B6033342D35561F8DF4CE8891CDDB + url = "${baseUrl}/ModelSimSetup-${version}-linux.run"; + sha256 = "1c0nzqbvx8s5shhifdfhcivv8x637gik9hqmvyhhifkqqrb5y8yc"; + }; + arria = fetchurl { + # Size: 497.7 MB MD5: 48577BD12E186361C7DE923E4CD19074 + url = "${baseUrl}/arria_lite-${version}.qdz"; + sha256 = "0arxpsc0xhsqc6hq89mwxv8xvmm6pq9bv33k8w2kk5x8n9whw4b3"; + }; + cyclone = fetchurl { + # Size: 463.9 MB MD5: FD95042C8C58782FF6C25C25EA83CA2E + url = "${baseUrl}/cyclone-${version}.qdz"; + sha256 = "1h6ihc8jxshxkw5iin90c5pc5kfqx5r8080cwavvr1rj9y6hif35"; + }; + cyclonev = fetchurl { + # Size: 1.1 GB MD5: 7F108A307455ACDC3CF6DA21B1FBF211 + url = "${baseUrl}/cyclonev-${version}.qdz"; + sha256 = "0028qmsbl4zsg9pgj4d72h08rq851yngp4q3p7x3aj80qgvlgwnm"; + }; + max = fetchurl { + # Size: 11.3 MB MD5: DEACB97D4A14A952521B6F1DFBCB958F + url = "${baseUrl}/max-${version}.qdz"; + sha256 = "108n59j0qn8mpalzh4zrf3zbgik4wy6xg5xil2k6h92fwalwl7hn"; + }; + max10 = fetchurl { + # Size: 338.9 MB MD5: C132D3689C78B3706B36E2C23A0F8209 + url = "${baseUrl}/max10-${version}.qdz"; + sha256 = "0479aggma94c9b2rvqjvwkgj7s3d455j2nmsbdb2gvp2k2dc5vg0"; + }; + }; + }; + + standard_edition = { + recurseForDerivations = true; + baseName = "altera-quartus-prime-standard"; + prettyName = "Quartus Prime Standard Edition"; + inherit version is32bitPackage updates; + components = { + recurseForDerivations = true; + quartus = fetchurl { + # Size: 2.4 GB MD5: EC505B3C9CDB377D0211D3EF0962FBB5 + url = "${baseUrl}/QuartusSetup-${version}-linux.run"; + sha256 = "1bly2vsmx7ff7q5bcc13yg30sfpw4csh0zis0gz17vzlj0h8rl9n"; + }; + modelsim = fetchurl { + # Size: 1.1 GB MD5: 5A6B6033342D35561F8DF4CE8891CDDB + url = "${baseUrl}/ModelSimSetup-${version}-linux.run"; + sha256 = "1c0nzqbvx8s5shhifdfhcivv8x637gik9hqmvyhhifkqqrb5y8yc"; + }; + arria = fetchurl { + # Size: 664.8 MB MD5: C4FB92D9DB5581FD3221B33F12FCF20A + url = "${baseUrl}/arria-${version}.qdz"; + sha256 = "1c8l0sa89qmw65dy0r0w2mnai0b80w5lgaxqj06xwn05v1ll9gr0"; + }; + arria10_part1 = fetchurl { + # Size: 3.0 GB MD5: D983C1BBB2CDC598E6AF66239C57F5B3 + url = "${baseUrl}/arria10_part1-${version}.qdz"; + sha256 = "1dq626sq8632dqshlxbdw11ycza5s92rcrwargf0mzqvd0jp9wam"; + }; + arria10_part2 = fetchurl { + # Size: 3.5 GB MD5: 1FB03F3AEF5B2E04281BC3F2EA71929E + url = "${baseUrl}/arria10_part2-${version}.qdz"; + sha256 = "043lvgv82vlv8wpkkv5dvgp0w5b19667y2ddlddw0345xff43841"; + }; + arria10_part3 = fetchurl { + # Size: 3.6 GB MD5: F460FC69761C71D2F6AAA5E35FB1FE75 + url = "${baseUrl}/arria10_part3-${version}.qdz"; + sha256 = "1mcahq4y8k75r4vi7fxah1w48s7hriz67s7f8bibv6lhvrxcpa4h"; + }; + arriav = fetchurl { + # Size: 1.3 GB MD5: C7E26A53F2A916D1E249B0BA45CDA9CB + url = "${baseUrl}/arriav-${version}.qdz"; + sha256 = "1wqnxz93bs44qpknczhj3cqm2gr9hfwpyzsd9k5dj84wgv74w4ll"; + }; + arriavgz = fetchurl { + # Size: 1.9 GB MD5: 075D5308C3DEDDDC3C8584BBA40D0211 + url = "${baseUrl}/arriavgz-${version}.qdz"; + sha256 = "1wq5vm7hsxl0l8r6d4v9bcjflh68g7pnall2zfyl2dalk2ccvwad"; + }; + cyclone = fetchurl { + # Size: 463.9 MB MD5: FD95042C8C58782FF6C25C25EA83CA2E + url = "${baseUrl}/cyclone-${version}.qdz"; + sha256 = "1h6ihc8jxshxkw5iin90c5pc5kfqx5r8080cwavvr1rj9y6hif35"; + }; + cyclonev = fetchurl { + # Size: 1.1 GB MD5: 7F108A307455ACDC3CF6DA21B1FBF211 + url = "${baseUrl}/cyclonev-${version}.qdz"; + sha256 = "0028qmsbl4zsg9pgj4d72h08rq851yngp4q3p7x3aj80qgvlgwnm"; + }; + max = fetchurl { + # Size: 11.3 MB MD5: DEACB97D4A14A952521B6F1DFBCB958F + url = "${baseUrl}/max-${version}.qdz"; + sha256 = "108n59j0qn8mpalzh4zrf3zbgik4wy6xg5xil2k6h92fwalwl7hn"; + }; + max10 = fetchurl { + # Size: 338.9 MB MD5: C132D3689C78B3706B36E2C23A0F8209 + url = "${baseUrl}/max10-${version}.qdz"; + sha256 = "0479aggma94c9b2rvqjvwkgj7s3d455j2nmsbdb2gvp2k2dc5vg0"; + }; + stratixiv = fetchurl { + # Size: 534.9 MB MD5: 490E54FDFF0F7C155D8EBECCC3F1A02A + url = "${baseUrl}/stratixiv-${version}.qdz"; + sha256 = "19skdlcfjdci1slghflzrf18war3al9n4sginvrk09f8ak60i48f"; + }; + stratixv = fetchurl { + # Size: 2.8 GB MD5: 587F193664F4CCC77D198B2F7DA9E29F + url = "${baseUrl}/stratixv-${version}.qdz"; + sha256 = "0i31ickji978igm1xj3sh6a2l19ddyyij0knxxiyrlmgwrahg6yx"; + }; + }; + }; + + # Updates are shared between editions. I.e. this update can be applied to + # either lite or standard editions. + updates = rec { + recurseForDerivations = true; + version = "15.1.2.193"; + updateBaseUrl = "http://download.altera.com/akdlm/software/acdsinst/15.1.2/193/update"; + components = { + recurseForDerivations = true; + quartus = fetchurl { + # Size: 4.1 GB MD5: EECCEF76A26E98E8022C59C7491FC215 + url = "${updateBaseUrl}/QuartusSetup-${version}-linux.run"; + sha256 = "0vv2ijjxyj0a7pqxqsjs1bvi6aq44bn0ml7inxcg1lrba095cmdl"; + }; + }; + }; + + }; + + v16 = rec { + recurseForDerivations = true; + version = "16.1.0.196"; + is32bitPackage = false; + baseUrl = "http://download.altera.com/akdlm/software/acdsinst/16.1/196/ib_installers"; + + lite_edition = { + recurseForDerivations = true; + baseName = "altera-quartus-prime-lite"; + prettyName = "Quartus Prime Lite Edition"; + inherit version is32bitPackage updates; + components = { + recurseForDerivations = true; + quartus = fetchurl { + # Size: 2.0 GB MD5: 0FFD781FCC23C6FABC6A68019B3CAB62 + url = "${baseUrl}/QuartusLiteSetup-${version}-linux.run"; + sha256 = "0k54sqxycpa3xpq17w260lb3d6fy3yz7jg100vcsyvpizfvlv8cb"; + }; + modelsim = fetchurl { + # Size: 1.1 GB MD5: F665D7016FF793E64F57B08B37487D0E + url = "${baseUrl}/ModelSimSetup-${version}-linux.run"; + sha256 = "1gxip6q2gl59scf6lj8scd9zx3acrphzq7xaniy67rwp7h0p2fzk"; + }; + arria = fetchurl { + # Size: 499.6 MB MD5: 77E151BBF3876F6110AB94F7C6A68047 + url = "${baseUrl}/arria_lite-${version}.qdz"; + sha256 = "0i7yarx9kkyzhm60gfjgwb23bfhcm0d56zg7jphgcjr1m7ipbhhw"; + }; + cyclone = fetchurl { + # Size: 466.7 MB MD5: 70A27B31D439D6271650C832A9785F2C + url = "${baseUrl}/cyclone-${version}.qdz"; + sha256 = "043psjc9a99pj4gh11xzk4pvhr1arlf30klw5j95kpm5aqh6cymx"; + }; + cyclonev = fetchurl { + # Size: 1.1 GB MD5: 8386E6891D17DC1FAF29067C46953FC7 + url = "${baseUrl}/cyclonev-${version}.qdz"; + sha256 = "1s77m6shqln6vmfqjrnnqdzv62w7ax86vswwhylzmib8g3gpl126"; + }; + max = fetchurl { + # Size: 11.4 MB MD5: AFC8FF969FBA63E84D5D40AE812F83A2 + url = "${baseUrl}/max-${version}.qdz"; + sha256 = "14vk6mazi822nmg6ha9cvx2014bkxhhwrq8z0gfmp88sgwlbsqyk"; + }; + max10 = fetchurl { + # Size: 331.3 MB MD5: 013AACB391EAD32FF8E094D9D14987C3 + url = "${baseUrl}/max10-${version}.qdz"; + sha256 = "0q6cyxk50ibv1vjc2l62q6kss8z4i3pcy693rhmh96w4vv8fyi62"; + }; + }; + }; + + standard_edition = { + recurseForDerivations = true; + baseName = "altera-quartus-prime-standard"; + prettyName = "Quartus Prime Standard Edition"; + inherit version is32bitPackage updates; + components = { + recurseForDerivations = true; + quartus = fetchurl { + # Size: 2.7 GB MD5: D8A1730C18F2D79EB080786FFFE2E203 + url = "${baseUrl}/QuartusSetup-${version}-linux.run"; + sha256 = "1zakbah11sjw94112h59bvkkha89kzm3p48iw948r0d0fva01xhr"; + }; + modelsim = fetchurl { + # Size: 1.1 GB MD5: F665D7016FF793E64F57B08B37487D0E + url = "${baseUrl}/ModelSimSetup-${version}-linux.run"; + sha256 = "1gxip6q2gl59scf6lj8scd9zx3acrphzq7xaniy67rwp7h0p2fzk"; + }; + arria = fetchurl { + # Size: 669.7 MB MD5: C3B3AB6ECA98C260F4EB31E778B4E51F + url = "${baseUrl}/arria-${version}.qdz"; + sha256 = "0x23pgmb5xxijs2hj58bl7q4k19ni4yjgfxi942xi02myhg3bgyz"; + }; + arria10_part1 = fetchurl { + # Size: 3.0 GB MD5: 9310F05926BAA61B31D687D8B7B7E669 + url = "${baseUrl}/arria10_part1-${version}.qdz"; + sha256 = "02g76fivcv8lpaybf0347dz2aimdcfn6yirq7xh5y5cknlc3di53"; + }; + arria10_part2 = fetchurl { + # Size: 3.6 GB MD5: CF548FB5A5CF098FBDE6892E3D92950F + url = "${baseUrl}/arria10_part2-${version}.qdz"; + sha256 = "001yh8gm35sbwrd1wq6d0w8c98dn5xaz5if5q61hv5sw15cn8cik"; + }; + arria10_part3 = fetchurl { + # Size: 3.0 GB MD5: 8247BAA0EB689C24C8D681675F44918A + url = "${baseUrl}/arria10_part3-${version}.qdz"; + sha256 = "0mbzmd7n5g3sidy2rk3wmrjqiwg5b81zmf7a0rl9a96bzgimjl64"; + }; + arriav = fetchurl { + # Size: 1.3 GB MD5: E0CCEE4BE7C7C926670AAFA9E9FE58A4 + url = "${baseUrl}/arriav-${version}.qdz"; + sha256 = "0san5kc3awsfphldwa8518aydgc42glnz8d96h2izycz3qkwia77"; + }; + arriavgz = fetchurl { + # Size: 2.0 GB MD5: B82B74B58BCE65CF6D9AFF1AAFDD76BB + url = "${baseUrl}/arriavgz-${version}.qdz"; + sha256 = "1kv1akkppz7a5j4x14kiz6mlvfk45rc7rg3gwrmg9rwyn93cvrmr"; + }; + cyclone = fetchurl { + # Size: 466.7 MB MD5: 70A27B31D439D6271650C832A9785F2C + url = "${baseUrl}/cyclone-${version}.qdz"; + sha256 = "043psjc9a99pj4gh11xzk4pvhr1arlf30klw5j95kpm5aqh6cymx"; + }; + cyclonev = fetchurl { + # Size: 1.1 GB MD5: 8386E6891D17DC1FAF29067C46953FC7 + url = "${baseUrl}/cyclonev-${version}.qdz"; + sha256 = "1s77m6shqln6vmfqjrnnqdzv62w7ax86vswwhylzmib8g3gpl126"; + }; + max = fetchurl { + # Size: 11.4 MB MD5: AFC8FF969FBA63E84D5D40AE812F83A2 + url = "${baseUrl}/max-${version}.qdz"; + sha256 = "14vk6mazi822nmg6ha9cvx2014bkxhhwrq8z0gfmp88sgwlbsqyk"; + }; + max10 = fetchurl { + # Size: 331.3 MB MD5: 013AACB391EAD32FF8E094D9D14987C3 + url = "${baseUrl}/max10-${version}.qdz"; + sha256 = "0q6cyxk50ibv1vjc2l62q6kss8z4i3pcy693rhmh96w4vv8fyi62"; + }; + stratixiv = fetchurl { + # Size: 544.5 MB MD5: 01084D9F216530499664839C51EE129C + url = "${baseUrl}/stratixiv-${version}.qdz"; + sha256 = "1jxz6rrcvzd6rf9qjwnrxkvggc6ajs62xvzffr3x1k37ildfc81c"; + }; + stratixv = fetchurl { + # Size: 2.9 GB MD5: C3E7C3569214D412B4E19BE58C89A194 + url = "${baseUrl}/stratixv-${version}.qdz"; + sha256 = "0ibzdb8fhzf0b9jxvqxgmb319gjxc7jplghakqznz6144nshjq44"; + }; + }; + }; + + # Updates are shared between editions. I.e. this update can be applied to + # either lite or standard editions. + updates = rec { + recurseForDerivations = true; + version = "16.1.2.203"; + updateBaseUrl = "http://download.altera.com/akdlm/software/acdsinst/16.1.2/203/update"; + components = { + recurseForDerivations = true; + quartus = fetchurl { + # Size: 2.4 GB MD5: 607E5CBFF6B674034413E675655DDA32 + url = "${updateBaseUrl}/QuartusSetup-${version}-linux.run"; + sha256 = "020ind25j4z060cr37gf8344aadqfwvpik1wkmrbrdja3aixn1g8"; + }; + }; + }; + + }; + + v17 = rec { + recurseForDerivations = true; + version = "17.1.0.590"; + is32bitPackage = false; + baseUrl = "http://download.altera.com/akdlm/software/acdsinst/17.1std/590/ib_installers"; + + lite_edition = { + recurseForDerivations = true; + baseName = "altera-quartus-prime-lite"; + prettyName = "Quartus Prime Lite Edition"; + inherit version is32bitPackage updates; + components = { + recurseForDerivations = true; + quartus = fetchurl { + # Size: 2.0 GB MD5: 8A22E65F15B695E7967A292CAA7275F3 + url = "${baseUrl}/QuartusLiteSetup-${version}-linux.run"; + sha256 = "1y8v207903zi367yy6iarqwmywqmw654rc3vgidla21kmqxs5n4k"; + }; + modelsim = fetchurl { + # Size: 1.1 GB MD5: 47E17B9DCCE592AD248991660B0B3CD8 + url = "${baseUrl}/ModelSimSetup-${version}-linux.run"; + sha256 = "1ilgyyjm3n9h1sybip7ng764g6y7alp32kvxkrjispbm7098xzv6"; + }; + arria = fetchurl { + # Size: 499.6 MB MD5: EA15FB95662AB632F2CD95A93D995A92 + url = "${baseUrl}/arria_lite-${version}.qdz"; + sha256 = "0ql9k0gsj1jg4c89afjg61gfy1zwmjmpxzjixrjvphiszk6gmadp"; + }; + cyclone = fetchurl { + # Size: 466.6 MB MD5: 09D346E4AE7AC403DF4F36563E6B7BFB + url = "${baseUrl}/cyclone-${version}.qdz"; + sha256 = "03jk7gsvqi93vyqay12l5vq7sg5ifd5yhycmk2irj0xshpg3x277"; + }; + cyclone10lp = fetchurl { + # Size: 266.1 MB MD5: C9D4AC6A692BE4C3EAC15473325218BB + url = "${baseUrl}/cyclone10lp-${version}.qdz"; + sha256 = "0vj5wxplpkhz4bmc0r2dbghnifznw6rm1jqjxqf6bmj23ap6qahq"; + }; + cyclonev = fetchurl { + # Size: 1.1 GB MD5: 747202966905F7917FB3B8F95228E026 + url = "${baseUrl}/cyclonev-${version}.qdz"; + sha256 = "0zmd3mkpz3cpclbasjjn8rrcffhsn2f00mw00jya3x259hrvvpcr"; + }; + max = fetchurl { + # Size: 11.4 MB MD5: 77B086D125489CD74D05FD9ED1AA4883 + url = "${baseUrl}/max-${version}.qdz"; + sha256 = "12h6sgqqdjf929mmdis5wad85c5bjmnwlp8xqjxl3hhzd15x1xcd"; + }; + max10 = fetchurl { + # Size: 325.2 MB MD5: 9B55655054A7EA1409160F27592F2358 + url = "${baseUrl}/max10-${version}.qdz"; + sha256 = "0xwvy7ja637qh7dbf64pxrhqhyr15ws9wdir1zfxwahdw0n1ril5"; + }; + }; + }; + + standard_edition = { + recurseForDerivations = true; + baseName = "altera-quartus-prime-standard"; + prettyName = "Quartus Prime Standard Edition"; + inherit version is32bitPackage updates; + components = { + recurseForDerivations = true; + quartus = fetchurl { + # Size: 2.7 GB MD5: 6526114644039D5011AD1FA3960941D1 + url = "${baseUrl}/QuartusSetup-${version}-linux.run"; + sha256 = "0kdlkqqi39l1frlf92amafqxfiyhmyljxi2d1wbgmacnr4msh19g"; + }; + modelsim = fetchurl { + # Size: 1.1 GB MD5: 47E17B9DCCE592AD248991660B0B3CD8 + url = "${baseUrl}/ModelSimSetup-${version}-linux.run"; + sha256 = "1ilgyyjm3n9h1sybip7ng764g6y7alp32kvxkrjispbm7098xzv6"; + }; + arria = fetchurl { + # Size: 669.7 MB MD5: 8B3BC0110C9485DDA2EE1B34A74D7B50 + url = "${baseUrl}/arria-${version}.qdz"; + sha256 = "1kmapmgip25jvzkg633zv8x6knbbcr8d512i3lnixn5f12zls4h6"; + }; + arria10_part1 = fetchurl { + # Size: 3.2 GB MD5: 9543781AE7538DCCB71142625934EB9A + url = "${baseUrl}/arria10_part1-${version}.qdz"; + sha256 = "11g8ifnas7vbl0kbbk6vzf6wb80kyi37d7w33y3lrwcv5p5g4igg"; + }; + arria10_part2 = fetchurl { + # Size: 3.6 GB MD5: F80A0EA351CBCF105E74EAC6893B0F56 + url = "${baseUrl}/arria10_part2-${version}.qdz"; + sha256 = "1crglrnlr5ygd825vzjcav4b1difyzi0lys5ffxzqqa0pkr9vbm0"; + }; + arria10_part3 = fetchurl { + # Size: 4.8 GB MD5: 7B0F872DA6E3F48DCCBD171A588A7546 + url = "${baseUrl}/arria10_part3-${version}.qdz"; + sha256 = "1x43khxxmlvql450m4l4d3c853g0n0zrhwq7ixykyk9z7alkj65q"; + }; + arriav = fetchurl { + # Size: 1.3 GB MD5: 577D4E4F470930AB8054C1AC88F24FB7 + url = "${baseUrl}/arriav-${version}.qdz"; + sha256 = "16fk0k26dqsxn7gwwb1f9fr96h1nj2yy48bhrwji7kb9bmwydys7"; + }; + arriavgz = fetchurl { + # Size: 2.0 GB MD5: 62DA0E43F4F6147646901611CE7CA043 + url = "${baseUrl}/arriavgz-${version}.qdz"; + sha256 = "02r5r66m6kj3zriyvshrd02mp4njpa1jack6bh4zdbr936wriiw3"; + }; + cyclone = fetchurl { + # Size: 466.6 MB MD5: 09D346E4AE7AC403DF4F36563E6B7BFB + url = "${baseUrl}/cyclone-${version}.qdz"; + sha256 = "03jk7gsvqi93vyqay12l5vq7sg5ifd5yhycmk2irj0xshpg3x277"; + }; + cyclone10lp = fetchurl { + # Size: 266.1 MB MD5: C9D4AC6A692BE4C3EAC15473325218BB + url = "${baseUrl}/cyclone10lp-${version}.qdz"; + sha256 = "0vj5wxplpkhz4bmc0r2dbghnifznw6rm1jqjxqf6bmj23ap6qahq"; + }; + cyclonev = fetchurl { + # Size: 1.1 GB MD5: 747202966905F7917FB3B8F95228E026 + url = "${baseUrl}/cyclonev-${version}.qdz"; + sha256 = "0zmd3mkpz3cpclbasjjn8rrcffhsn2f00mw00jya3x259hrvvpcr"; + }; + max = fetchurl { + # Size: 11.4 MB MD5: 77B086D125489CD74D05FD9ED1AA4883 + url = "${baseUrl}/max-${version}.qdz"; + sha256 = "12h6sgqqdjf929mmdis5wad85c5bjmnwlp8xqjxl3hhzd15x1xcd"; + }; + max10 = fetchurl { + # Size: 325.2 MB MD5: 9B55655054A7EA1409160F27592F2358 + url = "${baseUrl}/max10-${version}.qdz"; + sha256 = "0xwvy7ja637qh7dbf64pxrhqhyr15ws9wdir1zfxwahdw0n1ril5"; + }; + stratixiv = fetchurl { + # Size: 544.5 MB MD5: 9A8BA92290A4ABD5F658AF0ED6B314AA + url = "${baseUrl}/stratixiv-${version}.qdz"; + sha256 = "08pf4aa068h1m1fhg8bjbkh3sxw8rhgr5h7gwlzjjh2p8dgqr41q"; + }; + stratixv = fetchurl { + # Size: 2.9 GB MD5: 7A20672F48961BD91F20F23574FD7461 + url = "${baseUrl}/stratixv-${version}.qdz"; + sha256 = "0w115lsb3h2xlibg2c2qcw2rwigarv6569gn19xp3krk2h0i03p9"; + }; + }; + }; + + # Updates are shared between editions. I.e. this update can be applied to + # either lite or standard editions. + updates = rec { + recurseForDerivations = true; + version = "17.1.1.593"; + updateBaseUrl = "http://download.altera.com/akdlm/software/acdsinst/17.1std.1/593/update"; + components = { + recurseForDerivations = true; + quartus = fetchurl { + # Size: 1.9 GB MD5: 70E8016EA12CF7835DFCD3B22B1E3153 + url = "${updateBaseUrl}/QuartusSetup-${version}-linux.run"; + sha256 = "1nk903prd6qs1v5dyyh1l227drk7m99zssp3dc8v4jq53fv9hsjs"; + }; + }; + }; + }; + + v18 = rec { + recurseForDerivations = true; + version = "18.1.0.625"; + is32bitPackage = false; + baseUrl = "http://download.altera.com/akdlm/software/acdsinst/17.1std/590/ib_installers"; + + lite_edition = { + recurseForDerivations = true; + baseName = "altera-quartus-prime-lite"; + prettyName = "Quartus Prime Lite Edition"; + #inherit version is32bitpackage updates; + inherit version is32bitPackage; + components = { + recurseForDerivations = true; + quartus = fetchurl { + # Size: 2.0 GB MD5: 8A22E65F15B695E7967A292CAA7275F3 + url = "${baseUrl}/QuartusLiteSetup-${version}-linux.run"; + sha256 = "06d975f65f86290719407f92d6364487a713650388f583a8e2f251694bc45513"; + }; + modelsim = fetchurl { + # Size: 1.1 GB MD5: 47E17B9DCCE592AD248991660B0B3CD8 + url = "${baseUrl}/ModelSimSetup-${version}-linux.run"; + sha256 = "02e2a5ada4cdad78a1988508a98f8851c1a47ca82297ec4dc67b19b9414f52c1"; + }; + #arria = fetchurl { + # # Size: 499.6 MB MD5: EA15FB95662AB632F2CD95A93D995A92 + # url = "${baseUrl}/arria_lite-${version}.qdz"; + # sha256 = "0ql9k0gsj1jg4c89afjg61gfy1zwmjmpxzjixrjvphiszk6gmadp"; + #}; + cyclone = fetchurl { + # Size: 466.6 MB MD5: 09D346E4AE7AC403DF4F36563E6B7BFB + url = "${baseUrl}/cyclone-${version}.qdz"; + sha256 = "cb19bc70de45af52490f53b15931861949ce460cbcdf92aec4fd01192c957efd"; + }; + #cyclone10lp = fetchurl { + # # Size: 266.1 MB MD5: C9D4AC6A692BE4C3EAC15473325218BB + # url = "${baseUrl}/cyclone10lp-${version}.qdz"; + # sha256 = "0vj5wxplpkhz4bmc0r2dbghnifznw6rm1jqjxqf6bmj23ap6qahq"; + #}; + cyclonev = fetchurl { + # Size: 1.1 GB MD5: 747202966905F7917FB3B8F95228E026 + url = "${baseUrl}/cyclonev-${version}.qdz"; + sha256 = "03f89491eeb1a9dafb8b9d244db34f4fe25da1a5fd38d07c499733444c456329"; + }; + #max = fetchurl { + # # Size: 11.4 MB MD5: 77B086D125489CD74D05FD9ED1AA4883 + # url = "${baseUrl}/max-${version}.qdz"; + # sha256 = "12h6sgqqdjf929mmdis5wad85c5bjmnwlp8xqjxl3hhzd15x1xcd"; + #}; + #max10 = fetchurl { + # # Size: 325.2 MB MD5: 9B55655054A7EA1409160F27592F2358 + # url = "${baseUrl}/max10-${version}.qdz"; + # sha256 = "0xwvy7ja637qh7dbf64pxrhqhyr15ws9wdir1zfxwahdw0n1ril5"; + #}; + }; + }; + + #standard_edition = { + # recurseForDerivations = true; + # baseName = "altera-quartus-prime-standard"; + # prettyName = "Quartus Prime Standard Edition"; + # inherit version is32bitPackage updates; + # components = { + # recurseForDerivations = true; + # quartus = fetchurl { + # # Size: 2.7 GB MD5: 6526114644039D5011AD1FA3960941D1 + # url = "${baseUrl}/QuartusSetup-${version}-linux.run"; + # sha256 = "0kdlkqqi39l1frlf92amafqxfiyhmyljxi2d1wbgmacnr4msh19g"; + # }; + # modelsim = fetchurl { + # # Size: 1.1 GB MD5: 47E17B9DCCE592AD248991660B0B3CD8 + # url = "${baseUrl}/ModelSimSetup-${version}-linux.run"; + # sha256 = "1ilgyyjm3n9h1sybip7ng764g6y7alp32kvxkrjispbm7098xzv6"; + # }; + # arria = fetchurl { + # # Size: 669.7 MB MD5: 8B3BC0110C9485DDA2EE1B34A74D7B50 + # url = "${baseUrl}/arria-${version}.qdz"; + # sha256 = "1kmapmgip25jvzkg633zv8x6knbbcr8d512i3lnixn5f12zls4h6"; + # }; + # arria10_part1 = fetchurl { + # # Size: 3.2 GB MD5: 9543781AE7538DCCB71142625934EB9A + # url = "${baseUrl}/arria10_part1-${version}.qdz"; + # sha256 = "11g8ifnas7vbl0kbbk6vzf6wb80kyi37d7w33y3lrwcv5p5g4igg"; + # }; + # arria10_part2 = fetchurl { + # # Size: 3.6 GB MD5: F80A0EA351CBCF105E74EAC6893B0F56 + # url = "${baseUrl}/arria10_part2-${version}.qdz"; + # sha256 = "1crglrnlr5ygd825vzjcav4b1difyzi0lys5ffxzqqa0pkr9vbm0"; + # }; + # arria10_part3 = fetchurl { + # # Size: 4.8 GB MD5: 7B0F872DA6E3F48DCCBD171A588A7546 + # url = "${baseUrl}/arria10_part3-${version}.qdz"; + # sha256 = "1x43khxxmlvql450m4l4d3c853g0n0zrhwq7ixykyk9z7alkj65q"; + # }; + # arriav = fetchurl { + # # Size: 1.3 GB MD5: 577D4E4F470930AB8054C1AC88F24FB7 + # url = "${baseUrl}/arriav-${version}.qdz"; + # sha256 = "16fk0k26dqsxn7gwwb1f9fr96h1nj2yy48bhrwji7kb9bmwydys7"; + # }; + # arriavgz = fetchurl { + # # Size: 2.0 GB MD5: 62DA0E43F4F6147646901611CE7CA043 + # url = "${baseUrl}/arriavgz-${version}.qdz"; + # sha256 = "02r5r66m6kj3zriyvshrd02mp4njpa1jack6bh4zdbr936wriiw3"; + # }; + # cyclone = fetchurl { + # # Size: 466.6 MB MD5: 09D346E4AE7AC403DF4F36563E6B7BFB + # url = "${baseUrl}/cyclone-${version}.qdz"; + # sha256 = "03jk7gsvqi93vyqay12l5vq7sg5ifd5yhycmk2irj0xshpg3x277"; + # }; + # cyclone10lp = fetchurl { + # # Size: 266.1 MB MD5: C9D4AC6A692BE4C3EAC15473325218BB + # url = "${baseUrl}/cyclone10lp-${version}.qdz"; + # sha256 = "0vj5wxplpkhz4bmc0r2dbghnifznw6rm1jqjxqf6bmj23ap6qahq"; + # }; + # cyclonev = fetchurl { + # # Size: 1.1 GB MD5: 747202966905F7917FB3B8F95228E026 + # url = "${baseUrl}/cyclonev-${version}.qdz"; + # sha256 = "0zmd3mkpz3cpclbasjjn8rrcffhsn2f00mw00jya3x259hrvvpcr"; + # }; + # max = fetchurl { + # # Size: 11.4 MB MD5: 77B086D125489CD74D05FD9ED1AA4883 + # url = "${baseUrl}/max-${version}.qdz"; + # sha256 = "12h6sgqqdjf929mmdis5wad85c5bjmnwlp8xqjxl3hhzd15x1xcd"; + # }; + # max10 = fetchurl { + # # Size: 325.2 MB MD5: 9B55655054A7EA1409160F27592F2358 + # url = "${baseUrl}/max10-${version}.qdz"; + # sha256 = "0xwvy7ja637qh7dbf64pxrhqhyr15ws9wdir1zfxwahdw0n1ril5"; + # }; + # stratixiv = fetchurl { + # # Size: 544.5 MB MD5: 9A8BA92290A4ABD5F658AF0ED6B314AA + # url = "${baseUrl}/stratixiv-${version}.qdz"; + # sha256 = "08pf4aa068h1m1fhg8bjbkh3sxw8rhgr5h7gwlzjjh2p8dgqr41q"; + # }; + # stratixv = fetchurl { + # # Size: 2.9 GB MD5: 7A20672F48961BD91F20F23574FD7461 + # url = "${baseUrl}/stratixv-${version}.qdz"; + # sha256 = "0w115lsb3h2xlibg2c2qcw2rwigarv6569gn19xp3krk2h0i03p9"; + # }; + # }; + #}; + + # Updates are shared between editions. I.e. this update can be applied to + # either lite or standard editions. + #updates = rec { + # recurseForDerivations = true; + # version = "17.1.1.593"; + # updateBaseUrl = "http://download.altera.com/akdlm/software/acdsinst/17.1std.1/593/update"; + # components = { + # recurseForDerivations = true; + # quartus = fetchurl { + # # Size: 1.9 GB MD5: 70E8016EA12CF7835DFCD3B22B1E3153 + # url = "${updateBaseUrl}/QuartusSetup-${version}-linux.run"; + # sha256 = "1nk903prd6qs1v5dyyh1l227drk7m99zssp3dc8v4jq53fv9hsjs"; + # }; + # }; + #}; + + }; + +} diff --git a/web13.nix b/web13.nix new file mode 100644 index 0000000..188ca3d --- /dev/null +++ b/web13.nix @@ -0,0 +1,2 @@ +let nixpkgs = import ./pinned-nixpkgs.nix; +in (nixpkgs.callPackage ./quartus-versions.nix {}).altera-quartus-ii-web-13