fix ncurses5 with LD_LIBRARY_PATH hack

This commit is contained in:
pedohorse 2024-05-13 12:04:26 +02:00
parent 0b62737be6
commit 9a0df56451

View File

@ -1,4 +1,4 @@
{ lib, stdenv, writeScript, callPackage, buildFHSEnv, unwrapped ? callPackage ./runtime.nix {} }:
{ lib, stdenv, writeScript, ncurses5, callPackage, buildFHSEnv, unwrapped ? callPackage ./runtime.nix {} }:
buildFHSEnv rec {
name = "houdini-${unwrapped.version}";
@ -30,7 +30,6 @@ buildFHSEnv rec {
bintools # needed for ld and other tools, so ctypes can find/load sos from python
ocl-icd # needed for opencl
numactl # needed by hfs ocl backend
ncurses5 # needed by hfs ocl backend
zstd # needed from 20.0
] ++ (with xorg; [
libICE
@ -83,7 +82,7 @@ buildFHSEnv rec {
mkdir -p $out/$(dirname $executable)
echo "#!${stdenv.shell}" >> $out/$executable
echo "$WRAPPER ${unwrapped}/$executable \"\$@\"" >> $out/$executable
echo "exec $WRAPPER ${unwrapped}/$executable \"\$@\"" >> $out/$executable
done
cd $out
@ -96,6 +95,9 @@ buildFHSEnv rec {
];
runScript = writeScript "${name}-wrapper" ''
# ncurses5 is needed by hfs ocl backend
# workaround for this issue: https://github.com/NixOS/nixpkgs/issues/89769
export LD_LIBRARY_PATH=${lib.makeLibraryPath [ncurses5]}:$LD_LIBRARY_PATH
exec "$@"
'';
}