My already existing modelsim wrapper for nixos but converted to a flake and ported here. That way I don't have to include the 1.4G file in my config repo
Find a file
2026-10-18 15:15:39 +02:00
.gitignore Initial commit 2026-10-18 15:15:39 +02:00
default.nix Initial commit 2026-10-18 15:15:39 +02:00
flake.lock Initial commit 2026-10-18 15:15:39 +02:00
flake.nix Initial commit 2026-10-18 15:15:39 +02:00
modelsim.nix Initial commit 2026-10-18 15:15:39 +02:00
ModelSimSetup-20.1.1.720-linux.run Initial commit 2026-10-18 15:15:39 +02:00
README.md Initial commit 2026-10-18 15:15:39 +02:00

ModelSim ASE on NixOS

A small, self-contained flake that packages ModelSim ASE 20.1.1.720 (Intel FPGA Starter Edition) for x86_64-linux.

ModelSim is distributed as a "BitRock" self-extracting installer whose payload is a tree of 32-bit ELF binaries that expect a classic FHS root plus 32-bit X11/font libraries. NixOS provides neither, so the package:

  1. runs the vendor installer once, inside a throw-away FHS environment (the installer itself is a dynamically linked x86_64 binary), and
  2. wraps the extracted tree in a permanent FHS environment that supplies the 32-bit libraries and exposes the usual commands (vsim, vcom, vlog, …).

Files

File Purpose
flake.nix Flake outputs: packages, apps, overlays.default, formatter.
modelsim.nix The actual packaging (installer → extraction → FHS env → wrappers).
default.nix Non-flake convenience entry point (nix-build).
ModelSimSetup-20.1.1.720-linux.run The vendor installer (you provide this).

Getting the installer

Download ModelSimSetup-20.1.1.720-linux.run from Intel's download centre (search for ModelSim FPGA Starter Edition 20.1) and put it next to modelsim.nix. It is ~1.4 GB and is not redistributable, so it is not committed here.

If the file lives elsewhere, pass its path explicitly:

(import ./modelsim.nix { inherit pkgs; installer = /path/to/ModelSimSetup-20.1.1.720-linux.run; }).modelsim

If this directory is a git repository, the installer must be tracked (or referenced from outside) — Nix only copies git-tracked files when evaluating a flake.

Usage

# Build everything
$ nix build .#modelsim          # wrappers: vsim, vcom, vlog, ... (default)
$ nix build .#modelsim-ase      # just the extracted tree, no FHS wrapper

# Run a single command without installing anything
$ nix run .#vsim -- -version
$ nix run .#vcom -- -2008 design.vhd

Result layout:

result/bin/{vsim,vcom,vlog,vlib,vmap,vdel,vdir,vopt,vmake,...}

Add it to a NixOS / home-manager configuration through the overlay:

{
  inputs.modelsim.url = "path:/home/polo/modelsim/flake_project";

  # in the module
  nixpkgs.overlays = [ inputs.modelsim.overlays.default ];

  environment.systemPackages = [ pkgs.modelsim ];
  # or, with home-manager:
  home.packages = [ pkgs.modelsim ];
}

meta.license is unfree, so config.allowUnfree = true (or allowUnfreePredicate) is required when consuming it from a nixpkgs that enforces the license check.

Run without flakes (uses <nixpkgs>):

$ nix-build && ./result/bin/vsim -version

Notes

  • Licensing. ModelSim ASE is free-of-charge but proprietary (Intel EULA). The installer is invoked with --accept_eula 1; enabling this package means you accept that EULA.
  • License server. For the Premium/PE edition set SALT_LICENSE_SERVER in your environment; ASE auto-evaluates and does not need it. The wrapper defaults it to 1700@localhost only when the variable is unset.
  • 32-bit. Only x86_64-linux is supported — ModelSim ASE ships 32-bit binaries and the FHS environment pulls in their 32-bit dependencies (glibc, libstdc++, libX11, libXft, fontconfig, freetype, …). Everything is provided by the environment itself; nothing is taken from the host.
  • GUI. vsim/vish resolve all libX11/libXft/freetype dependencies from the FHS environment, so the GUI works as long as $DISPLAY is reachable.