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

38 lines
1 KiB
Nix
Raw Normal View History

{ lib, stdenv, writeScript, callPackage, buildFHSUserEnv, undaemonize, unwrapped ? callPackage ./runtime.nix {} }:
2017-07-12 15:36:28 +01:00
buildFHSUserEnv rec {
2021-06-27 21:47:50 +01:00
name = "houdini-${unwrapped.version}";
targetPkgs = pkgs: with pkgs; [
libGLU libGL alsa-lib fontconfig zlib libpng dbus nss nspr expat pciutils
libxkbcommon libudev tbb
2021-06-27 21:47:50 +01:00
] ++ (with xorg; [
libICE libSM libXmu libXi libXext libX11 libXrender libXcursor libXfixes
libXrender libXcomposite libXdamage libXtst libxcb libXScrnSaver
]);
2017-07-12 15:36:28 +01:00
passthru = {
2021-06-27 21:47:50 +01:00
inherit unwrapped;
};
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)
echo "#!${stdenv.shell}" >> $out/$executable
echo "$WRAPPER ${unwrapped}/$executable \$@" >> $out/$executable
done
cd $out
chmod +x $EXECUTABLES
'';
runScript = writeScript "${name}-wrapper" ''
exec $@
'';
2017-07-12 15:36:28 +01:00
}