nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 133 lines 3.2 kB view raw
1{ 2 lib, 3 stdenv, 4 writeScript, 5 ncurses5, 6 callPackage, 7 buildFHSEnv, 8 unwrapped ? callPackage ./runtime.nix { }, 9}: 10 11buildFHSEnv { 12 pname = "houdini"; 13 inherit (unwrapped) version; 14 15 # houdini spawns hserver (and other license tools) that is supposed to live beyond the lifespan of houdini process 16 dieWithParent = false; 17 18 # houdini needs to communicate with hserver process that it seem to be checking to be present in running processes 19 unsharePid = false; 20 21 targetPkgs = 22 pkgs: 23 with pkgs; 24 [ 25 libGLU 26 libGL 27 alsa-lib 28 fontconfig 29 zlib 30 libpng 31 dbus 32 nss 33 nspr 34 expat 35 pciutils 36 libxkbcommon 37 libudev0-shim 38 tbb 39 xwayland 40 qt5.qtwayland 41 net-tools # needed by licensing tools 42 bintools # needed for ld and other tools, so ctypes can find/load sos from python 43 ocl-icd # needed for opencl 44 numactl # needed by hfs ocl backend 45 zstd # needed from 20.0 46 ] 47 ++ (with xorg; [ 48 libICE 49 libSM 50 libXmu 51 libXi 52 libXt 53 libXext 54 libX11 55 libXrender 56 libXcursor 57 libXfixes 58 libXrender 59 libXcomposite 60 libXdamage 61 libXtst 62 libxcb 63 libXScrnSaver 64 libXrandr 65 libxcb 66 xcbutil 67 xcbutilimage 68 xcbutilrenderutil 69 xcbutilcursor 70 xcbutilkeysyms 71 xcbutilwm 72 ]); 73 74 passthru = { 75 inherit unwrapped; 76 }; 77 78 extraInstallCommands = 79 let 80 executables = [ 81 "bin/houdini" # houdini flavours 82 "bin/houdinicore" 83 "bin/houdinifx" 84 "bin/hgpuinfo" # houdini ocl config tool 85 "bin/hotl" # hda/otl manipulation tool 86 "bin/hython" # hython 87 "bin/hkey" # license administration 88 "bin/husk" # hydra rendereing tool 89 "bin/mantra" # mantra renderer 90 "houdini/sbin/sesinetd" 91 ]; 92 in 93 '' 94 mv $out/bin/houdini $out/bin/houdini-wrapper 95 WRAPPER=$out/bin/houdini-wrapper 96 EXECUTABLES="${lib.concatStringsSep " " executables}" 97 for executable in $EXECUTABLES; do 98 mkdir -p $out/$(dirname $executable) 99 100 echo "#!${stdenv.shell}" >> $out/$executable 101 echo "exec $WRAPPER ${unwrapped}/$executable \"\$@\"" >> $out/$executable 102 done 103 104 cd $out 105 chmod +x $EXECUTABLES 106 ''; 107 108 extraBwrapArgs = [ 109 "--ro-bind-try /run/opengl-driver/etc/OpenCL/vendors /etc/OpenCL/vendors" # this is the case of NixOS 110 "--ro-bind-try /etc/OpenCL/vendors /etc/OpenCL/vendors" # this is the case of not NixOS 111 ]; 112 113 runScript = writeScript "houdini-wrapper" '' 114 # ncurses5 is needed by hfs ocl backend 115 # workaround for this issue: https://github.com/NixOS/nixpkgs/issues/89769 116 export LD_LIBRARY_PATH=${lib.makeLibraryPath [ ncurses5 ]}:$LD_LIBRARY_PATH 117 exec "$@" 118 ''; 119 120 meta = { 121 description = "3D animation application software"; 122 homepage = "https://www.sidefx.com"; 123 license = lib.licenses.unfree; 124 platforms = [ "x86_64-linux" ]; 125 mainProgram = "houdini"; 126 hydraPlatforms = [ ]; # requireFile src's should be excluded 127 maintainers = with lib.maintainers; [ 128 canndrew 129 kwohlfahrt 130 pedohorse 131 ]; 132 }; 133}