2023-04-11 10:52:27 +00:00
|
|
|
{ lib, stdenv, writeScript, callPackage, buildFHSEnv, unwrapped ? callPackage ./runtime.nix {} }:
|
2017-07-12 14:36:28 +00:00
|
|
|
|
2023-04-11 10:52:27 +00:00
|
|
|
buildFHSEnv rec {
|
2021-06-27 20:47:50 +00:00
|
|
|
name = "houdini-${unwrapped.version}";
|
|
|
|
|
2023-05-10 18:26:40 +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-06-27 20:47:50 +00:00
|
|
|
targetPkgs = pkgs: with pkgs; [
|
2023-05-10 15:26:21 +00:00
|
|
|
libGLU
|
|
|
|
libGL
|
|
|
|
alsa-lib
|
|
|
|
fontconfig
|
|
|
|
zlib
|
|
|
|
libpng
|
|
|
|
dbus
|
|
|
|
nss
|
|
|
|
nspr
|
|
|
|
expat
|
|
|
|
pciutils
|
|
|
|
libxkbcommon
|
|
|
|
libudev0-shim
|
|
|
|
tbb
|
2023-05-10 18:20:44 +00:00
|
|
|
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
|
2021-06-27 20:47:50 +00:00
|
|
|
] ++ (with xorg; [
|
2023-05-10 15:26:21 +00:00
|
|
|
libICE
|
|
|
|
libSM
|
|
|
|
libXmu
|
|
|
|
libXi
|
2023-05-10 18:20:44 +00:00
|
|
|
libXt
|
2023-05-10 15:26:21 +00:00
|
|
|
libXext
|
|
|
|
libX11
|
|
|
|
libXrender
|
|
|
|
libXcursor
|
|
|
|
libXfixes
|
|
|
|
libXrender
|
|
|
|
libXcomposite
|
|
|
|
libXdamage
|
|
|
|
libXtst
|
|
|
|
libxcb
|
|
|
|
libXScrnSaver
|
2023-05-10 18:20:44 +00:00
|
|
|
libXrandr
|
|
|
|
libxcb
|
|
|
|
xcbutil
|
|
|
|
xcbutilimage
|
|
|
|
xcbutilrenderutil
|
|
|
|
xcbutilcursor
|
|
|
|
xcbutilkeysyms
|
|
|
|
xcbutilwm
|
2021-06-27 20:47:50 +00:00
|
|
|
]);
|
2017-07-12 14:36:28 +00:00
|
|
|
|
2021-06-20 13:41:32 +00:00
|
|
|
passthru = {
|
2021-06-27 20:47:50 +00:00
|
|
|
inherit unwrapped;
|
2021-06-20 13:41:32 +00:00
|
|
|
};
|
|
|
|
|
2021-06-27 21:58:58 +00:00
|
|
|
extraInstallCommands = let
|
2023-05-10 15:26:21 +00:00
|
|
|
executables = [
|
2023-05-10 18:31:54 +00:00
|
|
|
"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
|
2023-05-10 15:26:21 +00:00
|
|
|
"houdini/sbin/sesinetd"
|
|
|
|
];
|
2021-06-27 21:58:58 +00:00
|
|
|
in ''
|
|
|
|
WRAPPER=$out/bin/${name}
|
|
|
|
EXECUTABLES="${lib.concatStringsSep " " executables}"
|
|
|
|
for executable in $EXECUTABLES; do
|
|
|
|
mkdir -p $out/$(dirname $executable)
|
|
|
|
|
|
|
|
echo "#!${stdenv.shell}" >> $out/$executable
|
|
|
|
echo "$WRAPPER ${unwrapped}/$executable \$@" >> $out/$executable
|
|
|
|
done
|
|
|
|
|
|
|
|
cd $out
|
|
|
|
chmod +x $EXECUTABLES
|
|
|
|
'';
|
|
|
|
|
2023-05-10 18:34:46 +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-06-27 21:58:58 +00:00
|
|
|
runScript = writeScript "${name}-wrapper" ''
|
|
|
|
exec $@
|
|
|
|
'';
|
2017-07-12 14:36:28 +00:00
|
|
|
}
|