mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 17:03:01 +00:00
quartus-prime-lite: cleanup
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.
This commit is contained in:
parent
303121f35f
commit
c73d086a49
@ -25,7 +25,6 @@ in buildFHSUserEnv rec {
|
||||
# qsys requirements
|
||||
xorg.libXtst
|
||||
xorg.libXi
|
||||
libudev0-shim
|
||||
];
|
||||
multiPkgs = pkgs: with pkgs; let
|
||||
# This seems ugly - can we override `libpng = libpng12` for all `pkgs`?
|
||||
@ -44,6 +43,7 @@ in buildFHSUserEnv rec {
|
||||
xorg.libX11
|
||||
xorg.libXext
|
||||
xorg.libXrender
|
||||
libudev0-shim
|
||||
];
|
||||
|
||||
passthru = { inherit unwrapped; };
|
||||
@ -71,7 +71,7 @@ in buildFHSUserEnv rec {
|
||||
EXECUTABLES="${lib.concatStringsSep " " (quartusExecutables ++ qsysExecutables ++ modelsimExecutables)}"
|
||||
for executable in $EXECUTABLES; do
|
||||
echo "#!${stdenv.shell}" >> $out/$executable
|
||||
echo "$WRAPPER ${unwrapped}/$executable \$@" >> $out/$executable
|
||||
echo "$WRAPPER ${unwrapped}/$executable \"\$@\"" >> $out/$executable
|
||||
done
|
||||
|
||||
cd $out
|
||||
@ -80,7 +80,12 @@ in buildFHSUserEnv rec {
|
||||
ln --symbolic --relative --target-directory ./bin $EXECUTABLES
|
||||
'';
|
||||
|
||||
# LD_PRELOAD fixes issues in the licensing system that cause memory corruption and crashes when
|
||||
# starting most operations in many containerized environments, including WSL2, Docker, and LXC
|
||||
# (a similiar fix involving LD_PRELOADing tcmalloc did not solve the issue in my situation)
|
||||
# we use the name so that quartus can load the 64 bit verson and modelsim can load the 32 bit version
|
||||
# https://community.intel.com/t5/Intel-FPGA-Software-Installation/Running-Quartus-Prime-Standard-on-WSL-crashes-in-libudev-so/m-p/1189032
|
||||
runScript = writeScript "${name}-wrapper" ''
|
||||
exec $@
|
||||
exec env LD_PRELOAD=libudev.so.0 "$@"
|
||||
'';
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, lib, unstick, requireFile
|
||||
{ stdenv, lib, unstick, fetchurl
|
||||
, supportedDevices ? [ "Arria II" "Cyclone V" "Cyclone IV" "Cyclone 10 LP" "MAX II/V" "MAX 10 FPGA" ]
|
||||
}:
|
||||
|
||||
@ -34,18 +34,18 @@ let
|
||||
};
|
||||
|
||||
version = "20.1.1.720";
|
||||
homepage = "https://fpgasoftware.intel.com";
|
||||
|
||||
require = {name, sha256}: requireFile {
|
||||
download = {name, sha256}: fetchurl {
|
||||
inherit name sha256;
|
||||
url = "${homepage}/${lib.versions.majorMinor version}/?edition=lite&platform=linux";
|
||||
# e.g. "20.1.1.720" -> "20.1std.1/720"
|
||||
url = "https://downloads.intel.com/akdlm/software/acdsinst/${lib.versions.majorMinor version}std.${lib.versions.patch version}/${lib.elemAt (lib.splitVersion version) 3}/ib_installers/${name}";
|
||||
};
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
inherit version;
|
||||
pname = "quartus-prime-lite-unwrapped";
|
||||
|
||||
src = map require ([{
|
||||
src = map download ([{
|
||||
name = "QuartusLiteSetup-${version}-linux.run";
|
||||
sha256 = "0mjp1rg312dipr7q95pb4nf4b8fwvxgflnd1vafi3g9cshbb1c3k";
|
||||
} {
|
||||
@ -87,12 +87,11 @@ in stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
inherit homepage;
|
||||
homepage = "https://fpgasoftware.intel.com";
|
||||
description = "FPGA design and simulation software";
|
||||
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
||||
license = licenses.unfree;
|
||||
platforms = platforms.linux;
|
||||
hydraPlatforms = [ ]; # requireFile srcs cannot be fetched by hydra, ignore
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = with maintainers; [ kwohlfahrt ];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user