diff options
Diffstat (limited to 'pkgs/by-name/ar/arcan/wrapper.nix')
-rw-r--r-- | pkgs/by-name/ar/arcan/wrapper.nix | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/pkgs/by-name/ar/arcan/wrapper.nix b/pkgs/by-name/ar/arcan/wrapper.nix new file mode 100644 index 0000000000000..b61c5a5becd87 --- /dev/null +++ b/pkgs/by-name/ar/arcan/wrapper.nix @@ -0,0 +1,29 @@ +{ arcan +, makeWrapper +, symlinkJoin +, appls ? [ ] +, name ? "arcan-wrapped" +}: + +symlinkJoin rec { + inherit name; + + paths = appls ++ [ arcan ]; + + nativeBuildInputs = [ makeWrapper ]; + + postBuild = '' + for prog in ${placeholder "out"}/bin/*; do + wrapProgram $prog \ + --prefix PATH ":" "${placeholder "out"}/bin" \ + --set ARCAN_APPLBASEPATH "${placeholder "out"}/share/arcan/appl/" \ + --set ARCAN_BINPATH "${placeholder "out"}/bin/arcan_frameserver" \ + --set ARCAN_LIBPATH "${placeholder "out"}/lib/" \ + --set ARCAN_RESOURCEPATH "${placeholder "out"}/share/arcan/resources/" \ + --set ARCAN_SCRIPTPATH "${placeholder "out"}/share/arcan/scripts/" + done + ''; +} +# TODO: set ARCAN_STATEBASEPATH to $HOME/.arcan/resources/savestates/ - possibly +# via a suitable script +# TODO: set ARCAN_FONTPATH to a set of default-but-configurable fontset |