Merge pull request #187653 from tpwrules/fix-quartus
This commit is contained in:
commit
2597a22c25
2 changed files with 15 additions and 11 deletions
|
@ -25,7 +25,6 @@ in buildFHSUserEnv rec {
|
||||||
# qsys requirements
|
# qsys requirements
|
||||||
xorg.libXtst
|
xorg.libXtst
|
||||||
xorg.libXi
|
xorg.libXi
|
||||||
libudev0-shim
|
|
||||||
];
|
];
|
||||||
multiPkgs = pkgs: with pkgs; let
|
multiPkgs = pkgs: with pkgs; let
|
||||||
# This seems ugly - can we override `libpng = libpng12` for all `pkgs`?
|
# This seems ugly - can we override `libpng = libpng12` for all `pkgs`?
|
||||||
|
@ -44,6 +43,7 @@ in buildFHSUserEnv rec {
|
||||||
xorg.libX11
|
xorg.libX11
|
||||||
xorg.libXext
|
xorg.libXext
|
||||||
xorg.libXrender
|
xorg.libXrender
|
||||||
|
libudev0-shim
|
||||||
];
|
];
|
||||||
|
|
||||||
passthru = { inherit unwrapped; };
|
passthru = { inherit unwrapped; };
|
||||||
|
@ -71,7 +71,7 @@ in buildFHSUserEnv rec {
|
||||||
EXECUTABLES="${lib.concatStringsSep " " (quartusExecutables ++ qsysExecutables ++ modelsimExecutables)}"
|
EXECUTABLES="${lib.concatStringsSep " " (quartusExecutables ++ qsysExecutables ++ modelsimExecutables)}"
|
||||||
for executable in $EXECUTABLES; do
|
for executable in $EXECUTABLES; do
|
||||||
echo "#!${stdenv.shell}" >> $out/$executable
|
echo "#!${stdenv.shell}" >> $out/$executable
|
||||||
echo "$WRAPPER ${unwrapped}/$executable \$@" >> $out/$executable
|
echo "$WRAPPER ${unwrapped}/$executable \"\$@\"" >> $out/$executable
|
||||||
done
|
done
|
||||||
|
|
||||||
cd $out
|
cd $out
|
||||||
|
@ -80,7 +80,12 @@ in buildFHSUserEnv rec {
|
||||||
ln --symbolic --relative --target-directory ./bin $EXECUTABLES
|
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" ''
|
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" ]
|
, 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";
|
version = "20.1.1.720";
|
||||||
homepage = "https://fpgasoftware.intel.com";
|
|
||||||
|
|
||||||
require = {name, sha256}: requireFile {
|
download = {name, sha256}: fetchurl {
|
||||||
inherit name sha256;
|
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 {
|
in stdenv.mkDerivation rec {
|
||||||
inherit version;
|
inherit version;
|
||||||
pname = "quartus-prime-lite-unwrapped";
|
pname = "quartus-prime-lite-unwrapped";
|
||||||
|
|
||||||
src = map require ([{
|
src = map download ([{
|
||||||
name = "QuartusLiteSetup-${version}-linux.run";
|
name = "QuartusLiteSetup-${version}-linux.run";
|
||||||
sha256 = "0mjp1rg312dipr7q95pb4nf4b8fwvxgflnd1vafi3g9cshbb1c3k";
|
sha256 = "0mjp1rg312dipr7q95pb4nf4b8fwvxgflnd1vafi3g9cshbb1c3k";
|
||||||
} {
|
} {
|
||||||
|
@ -87,12 +87,11 @@ in stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
inherit homepage;
|
homepage = "https://fpgasoftware.intel.com";
|
||||||
description = "FPGA design and simulation software";
|
description = "FPGA design and simulation software";
|
||||||
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
||||||
license = licenses.unfree;
|
license = licenses.unfree;
|
||||||
platforms = platforms.linux;
|
platforms = [ "x86_64-linux" ];
|
||||||
hydraPlatforms = [ ]; # requireFile srcs cannot be fetched by hydra, ignore
|
|
||||||
maintainers = with maintainers; [ kwohlfahrt ];
|
maintainers = with maintainers; [ kwohlfahrt ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue