3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/misc/houdini/runtime.nix

89 lines
2.8 KiB
Nix
Raw Normal View History

{ lib, stdenv, requireFile, zlib, libpng, libSM, libICE, fontconfig, xorg, libGLU, libGL, alsa-lib
, dbus, xkeyboardconfig, nss, nspr, expat, pciutils, libxkbcommon, bc, addOpenGLRunpath
}:
2017-07-12 15:36:28 +01:00
let
2020-02-26 12:05:11 +00:00
# NOTE: Some dependencies only show in errors when run with QT_DEBUG_PLUGINS=1
2017-07-12 15:36:28 +01:00
ld_library_path = builtins.concatStringsSep ":" [
"${stdenv.cc.cc.lib}/lib64"
2021-01-15 05:42:41 +00:00
(lib.makeLibraryPath [
libGLU
libGL
2017-07-12 15:36:28 +01:00
xorg.libXmu
xorg.libXi
xorg.libXext
xorg.libX11
xorg.libXrender
xorg.libXcursor
xorg.libXfixes
xorg.libXrender
xorg.libXcomposite
xorg.libXdamage
xorg.libXtst
2020-02-26 12:05:11 +00:00
xorg.libxcb
xorg.libXScrnSaver
alsa-lib
2017-07-12 15:36:28 +01:00
fontconfig
libSM
libICE
zlib
libpng
dbus
addOpenGLRunpath.driverLink
2020-02-26 12:05:11 +00:00
nss
nspr
expat
pciutils
libxkbcommon
2017-07-12 15:36:28 +01:00
])
];
license_dir = "~/.config/houdini";
in
stdenv.mkDerivation rec {
2020-06-04 13:26:25 +01:00
version = "18.0.460";
pname = "houdini-runtime";
2017-07-12 15:36:28 +01:00
src = requireFile rec {
2018-11-14 14:27:30 +00:00
name = "houdini-${version}-linux_x86_64_gcc6.3.tar.gz";
2020-06-04 13:26:25 +01:00
sha256 = "18rbwszcks2zfn9zbax62rxmq50z9mc3h39b13jpd39qjqdd3jsd";
url = meta.homepage;
2017-07-12 15:36:28 +01:00
};
buildInputs = [ bc ];
installPhase = ''
patchShebangs houdini.install
mkdir -p $out
sed -i "s|/usr/lib/sesi|${license_dir}|g" houdini.install
./houdini.install --install-houdini \
--no-install-menus \
--no-install-bin-symlink \
--auto-install \
--no-root-check \
--accept-EULA \
$out
echo -e "localValidatorDir = ${license_dir}\nlicensingMode = localValidator" > $out/houdini/Licensing.opt
2017-07-12 15:36:28 +01:00
sed -i "s|/usr/lib/sesi|${license_dir}|g" $out/houdini/sbin/sesinetd_safe
sed -i "s|/usr/lib/sesi|${license_dir}|g" $out/houdini/sbin/sesinetd.startup
echo "export LD_LIBRARY_PATH=${ld_library_path}" >> $out/bin/app_init.sh
echo "export QT_XKB_CONFIG_ROOT="${xkeyboardconfig}/share/X11/xkb"" >> $out/bin/app_init.sh
2017-07-12 15:36:28 +01:00
echo "export LD_LIBRARY_PATH=${ld_library_path}" >> $out/houdini/sbin/app_init.sh
echo "export QT_XKB_CONFIG_ROOT="${xkeyboardconfig}/share/X11/xkb"" >> $out/houdini/sbin/app_init.sh
2017-07-12 15:36:28 +01:00
'';
postFixup = ''
INTERPRETER="$(cat "$NIX_CC"/nix-support/dynamic-linker)"
for BIN in $(find $out/bin -type f -executable); do
if patchelf $BIN 2>/dev/null ; then
echo "Patching ELF $BIN"
patchelf --set-interpreter "$INTERPRETER" "$BIN"
fi
done
'';
meta = {
description = "3D animation application software";
homepage = "https://www.sidefx.com";
2021-01-15 05:42:41 +00:00
license = lib.licenses.unfree;
platforms = lib.platforms.linux;
hydraPlatforms = [ ]; # requireFile src's should be excluded
2021-06-20 14:32:50 +01:00
maintainers = with lib.maintainers; [ canndrew kwohlfahrt ];
2017-07-12 15:36:28 +01:00
};
}