From 44efd7439fb7f0100b25ed24eb9c8aac9850204e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Sat, 23 Sep 2023 23:58:50 +0200 Subject: [PATCH] quartus-prime-lite: eliminate two unneeded execve syscalls * Set LD_PRELOAD in the profile snippet to eliminate one execve() for `env`. * Set runScript to "" to eliminate one execve() for bash. (cherry picked from commit f7d59bb1fbefe591f56fb516b62c9b6419a03f8d) --- pkgs/applications/editors/quartus-prime/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/quartus-prime/default.nix b/pkgs/applications/editors/quartus-prime/default.nix index 1ec9d3588979..ef9164f3228c 100644 --- a/pkgs/applications/editors/quartus-prime/default.nix +++ b/pkgs/applications/editors/quartus-prime/default.nix @@ -89,7 +89,10 @@ in buildFHSEnvChroot rec { # (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 env LD_PRELOAD=libudev.so.0 "$@" + profile = '' + export LD_PRELOAD=libudev.so.0 ''; + + # Run the wrappers directly, instead of going via bash. + runScript = ""; }