Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Reference version and meta from the unwrapped derivation in the
wrapped/FHS derivation.
|
|
Modernizing.
|
|
For customizing /etc/profile in the FHS env.
|
|
Saves ~5GB of closure size and eliminates dependency on 32 bit
libraries.
|
|
|
|
Needed on certain systems and for certain SoC designs.
|
|
|
|
Test that the wrapped quartus can build a SOF file.
|
|
|
|
Loading without a path was broken by nixpkgs commit
e2d06c56951459ab3aebfb40c366ab635a021366. Fortunately we don't want
libudev.so.0 in modelsim now anyway which was the reason for loading by
name only, so we move it back to being 64-bit only and load it by
absolute path.
|
|
Just because nixpkgs can split upstream packages and hide certain
programs doesn't mean we should. Upstream documents that users should
add the ModelSim bin/ path to $PATH:
https://www.intel.com/content/www/us/en/docs/programmable/683200/1-2-1-and-2-0-1/setting-up-the-environment.html
This answers the comment "Should we install all executables?" -- yes.
|
|
stdenv.shell is a shell for building, runtimeShell is for running, so
the latter should be used in wrappers. (The distinction only matters
when cross-compiling.)
|
|
Prevent regressions.
|
|
LD_PRELOADing libudev breaks compiling encrypted device models in
ModelSim, so only use LD_PRELOAD for non-ModelSim wrappers.
Before:
$ "$(NIXPKGS_ALLOW_UNFREE=1 nix-build -A quartus-prime-lite)/bin/vlog" "$(NIXPKGS_ALLOW_UNFREE=1 nix-build -A quartus-prime-lite.unwrapped)/modelsim_ase/altera/verilog/src/arriav_atoms_ncrypt.v"
[...]
** Error: /nix/store/szcr2q24izqvhz7ybalar43y5xdg172a-quartus-prime-lite-unwrapped-20.1.1.720/modelsim_ase/altera/verilog/src/arriav_atoms_ncrypt.v(38): (vlog-2163) Macro `<protected> is undefined.
** Error: /nix/store/szcr2q24izqvhz7ybalar43y5xdg172a-quartus-prime-lite-unwrapped-20.1.1.720/modelsim_ase/altera/verilog/src/arriav_atoms_ncrypt.v(38): (vlog-2163) Macro `<protected> is undefined.
** Error: (vlog-13069) /nix/store/szcr2q24izqvhz7ybalar43y5xdg172a-quartus-prime-lite-unwrapped-20.1.1.720/modelsim_ase/altera/verilog/src/arriav_atoms_ncrypt.v(38): syntax error in protected region.
[...]
Errors: 4, Warnings: 0
After:
$ "$(NIXPKGS_ALLOW_UNFREE=1 nix-build -A quartus-prime-lite)/bin/vlog" "$(NIXPKGS_ALLOW_UNFREE=1 nix-build -A quartus-prime-lite.unwrapped)/modelsim_ase/altera/verilog/src/arriav_atoms_ncrypt.v"
[...]
Errors: 0, Warnings: 0
|
|
Coding style.
|
|
The former is deprecated. The latter is implemented with
buildFHSEnvBubblewrap. The reason this package was switched to
buildFHSEnvChroot in the first place[1] is fixed by passing `multiArch =
true` (which brings e.g. 32-bit dynamic loader /lib/ld-linux.so.2).
[1] Commit cae417d315dd27 ("quartus-prime: use buildFHSEnvChroot")
|
|
Instead, merge the user provided LD_PRELOAD environment variable with
the hardcoded libudev.so.1 entry. User provided libs are loaded first.
|
|
* Set LD_PRELOAD in the profile snippet to eliminate one execve() for `env`.
* Set runScript to "" to eliminate one execve() for bash.
|
|
* Upstream recommends it (adding $QUARTUS_ROOTDIR/bin to $PATH).
* It's cool that nixpkgs *can* do these tricks (only expose a subset of
programs), but in this case I don't think it's a good idea. For
example, before this change I was missing the `jtagconfig` program.
* This increases the number of programs in .../bin from 29 to 80.
|
|
These are useful for Modelsim scripting.
|
|
It's tool to check the validity of licenses, and vsim suggests running
it when it has issues validating a license. (At least in Quartus
22.1.2.)
|
|
(In preparation for adding lmutil.)
Quartus is a mix of 32- and 64-bit programs, and these "lsb" loaders are
required by some of the unwrapped binaries:
$ find /nix/store/HASH-quartus-prime-lite-unwrapped-20.1.1.720 -type f -executable | xargs -n1 patchelf --print-interpreter |& grep "ld-lsb" | sort -u
/lib64/ld-lsb-x86-64.so.3
/lib/ld-lsb.so.3
|
|
This opens up for using sh globbing (and possibly wrapping *all*
programs), something which is not possible when the program list is
coded in Nix.
|
|
Upper case shell variables are generally for internal variables (SHELL,
BASH_VERSION) or environment variables (PAGER, EDITOR). Other variables
should be lower case.
|
|
Instead of maintaining both a list of executables to wrap and their
directory names, extract the directory names from the executables and
run mkdir as needed. Keep DRY.
|
|
Does not work with bubblewrap for some reason
|
|
Needs libxcrypt.so.1
|
|
|
|
|
|
Fixes a few issues, listed below.
Intel's website redesign broke the requireFile link, but fortunately
files can now be downloaded without a user account. The derivation
is modified to remove requireFile and download directly instead.
Issues with quoting command line arguments are corrected.
An issue causing crashes when running in containers is worked around
with LD_PRELOAD.
The meta.platforms attribute is corrected to the supported processors.
|
|
|
|
Notably:
- remove explicit arguments that match the defaults
- convert everything to the right Nix types
|
|
|
|
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
|
|
|
|
This allows customizing the install process for the unwrapped process,
as proposed in #123469, without introducing top-level support for
untested modifications.
The PR could then be straightforwardly implemented as an overlay, that
does:
quartus-prime-lite = super.quartus-prime-lite.override {
unwrapped = quartus-prime-lite.unwrapped.overrideAttrs (o: {
buildCommand = o.buildCommand + ''
rm -r $out/nios2eds/bin/gnu
find $out/modelsim_ase/altera/{verilog,vhdl}/* ! -name src ! -path '*twentynm*' -delete
'';
});
};
|
|
|
|
|
|
buildFHSUserEnv does not currently support multiple binaries, so doing
this manually with wrappers.
Pass through original quartus derivation for debugging/overriding
|
|
|
|
This requires a FHSUserEnv because the licensing executable checksums
itself (I think).
The override of libpng is a bit ugly, can this be cleaned up?
|