2023-04-29 16:46:19 +00:00
|
|
|
{ lib, stdenv, writeScript, callPackage, buildFHSEnv, unwrapped ? callPackage ./runtime.nix {} }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
buildFHSEnv rec {
|
2021-09-18 10:52:07 +00:00
|
|
|
name = "houdini-${unwrapped.version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
# houdini spawns hserver (and other license tools) that is supposed to live beyond the lifespan of houdini process
|
|
|
|
dieWithParent = false;
|
|
|
|
|
|
|
|
# houdini needs to communicate with hserver process that it seem to be checking to be present in running processes
|
|
|
|
unsharePid = false;
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
targetPkgs = pkgs: with pkgs; [
|
2023-05-24 13:37:59 +00:00
|
|
|
libGLU
|
|
|
|
libGL
|
|
|
|
alsa-lib
|
|
|
|
fontconfig
|
|
|
|
zlib
|
|
|
|
libpng
|
|
|
|
dbus
|
|
|
|
nss
|
|
|
|
nspr
|
|
|
|
expat
|
|
|
|
pciutils
|
|
|
|
libxkbcommon
|
|
|
|
libudev0-shim
|
|
|
|
tbb
|
|
|
|
xwayland
|
|
|
|
qt5.qtwayland
|
|
|
|
nettools # needed by licensing tools
|
|
|
|
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
|
2024-01-25 14:12:00 +00:00
|
|
|
zstd # needed from 20.0
|
2021-09-18 10:52:07 +00:00
|
|
|
] ++ (with xorg; [
|
2023-05-24 13:37:59 +00:00
|
|
|
libICE
|
|
|
|
libSM
|
|
|
|
libXmu
|
|
|
|
libXi
|
|
|
|
libXt
|
|
|
|
libXext
|
|
|
|
libX11
|
|
|
|
libXrender
|
|
|
|
libXcursor
|
|
|
|
libXfixes
|
|
|
|
libXrender
|
|
|
|
libXcomposite
|
|
|
|
libXdamage
|
|
|
|
libXtst
|
|
|
|
libxcb
|
|
|
|
libXScrnSaver
|
|
|
|
libXrandr
|
|
|
|
libxcb
|
|
|
|
xcbutil
|
|
|
|
xcbutilimage
|
|
|
|
xcbutilrenderutil
|
|
|
|
xcbutilcursor
|
|
|
|
xcbutilkeysyms
|
|
|
|
xcbutilwm
|
2021-09-18 10:52:07 +00:00
|
|
|
]);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-03 03:11:41 +00:00
|
|
|
passthru = {
|
2021-09-18 10:52:07 +00:00
|
|
|
inherit unwrapped;
|
2021-07-03 03:11:41 +00:00
|
|
|
};
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
extraInstallCommands = let
|
2023-05-24 13:37:59 +00:00
|
|
|
executables = [
|
|
|
|
"bin/houdini" # houdini flavours
|
|
|
|
"bin/houdinicore"
|
|
|
|
"bin/houdinifx"
|
|
|
|
"bin/hgpuinfo" # houdini ocl config tool
|
|
|
|
"bin/hotl" # hda/otl manipulation tool
|
|
|
|
"bin/hython" # hython
|
|
|
|
"bin/hkey" # license administration
|
2024-01-02 11:29:13 +00:00
|
|
|
"bin/husk" # hydra rendereing tool
|
|
|
|
"bin/mantra" # mantra renderer
|
2023-05-24 13:37:59 +00:00
|
|
|
"houdini/sbin/sesinetd"
|
|
|
|
];
|
2021-09-18 10:52:07 +00:00
|
|
|
in ''
|
|
|
|
WRAPPER=$out/bin/${name}
|
|
|
|
EXECUTABLES="${lib.concatStringsSep " " executables}"
|
|
|
|
for executable in $EXECUTABLES; do
|
|
|
|
mkdir -p $out/$(dirname $executable)
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
echo "#!${stdenv.shell}" >> $out/$executable
|
2024-01-02 11:29:13 +00:00
|
|
|
echo "$WRAPPER ${unwrapped}/$executable \"\$@\"" >> $out/$executable
|
2021-09-18 10:52:07 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
cd $out
|
|
|
|
chmod +x $EXECUTABLES
|
|
|
|
'';
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
extraBwrapArgs = [
|
|
|
|
"--ro-bind-try /run/opengl-driver/etc/OpenCL/vendors /etc/OpenCL/vendors" # this is the case of NixOS
|
|
|
|
"--ro-bind-try /etc/OpenCL/vendors /etc/OpenCL/vendors" # this is the case of not NixOS
|
|
|
|
];
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
runScript = writeScript "${name}-wrapper" ''
|
2024-01-02 11:29:13 +00:00
|
|
|
exec "$@"
|
2021-09-18 10:52:07 +00:00
|
|
|
'';
|
|
|
|
}
|