2021-09-18 10:52:07 +00:00
|
|
|
{ lib, stdenv, writeScript, callPackage, buildFHSUserEnv, undaemonize, unwrapped ? callPackage ./runtime.nix {} }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
buildFHSUserEnv rec {
|
|
|
|
name = "houdini-${unwrapped.version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
targetPkgs = pkgs: with pkgs; [
|
|
|
|
libGLU libGL alsa-lib fontconfig zlib libpng dbus nss nspr expat pciutils
|
|
|
|
libxkbcommon libudev0-shim tbb
|
|
|
|
] ++ (with xorg; [
|
|
|
|
libICE libSM libXmu libXi libXext libX11 libXrender libXcursor libXfixes
|
|
|
|
libXrender libXcomposite libXdamage libXtst libxcb libXScrnSaver
|
|
|
|
]);
|
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
|
|
|
|
executables = [ "bin/houdini" "bin/hkey" "houdini/sbin/sesinetd" ];
|
|
|
|
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
|
|
|
|
echo "$WRAPPER ${unwrapped}/$executable \$@" >> $out/$executable
|
|
|
|
done
|
|
|
|
|
|
|
|
cd $out
|
|
|
|
chmod +x $EXECUTABLES
|
|
|
|
'';
|
|
|
|
|
|
|
|
runScript = writeScript "${name}-wrapper" ''
|
|
|
|
exec $@
|
|
|
|
'';
|
|
|
|
}
|