jluningp / smlformat

An auto-formatter for the Standard ML language
20 stars 3 forks source link

Arch Linux package #5

Open xyproto opened 1 year ago

xyproto commented 1 year ago

Hi,

This is a feature request.

I'm trying to package smlformat for Arch Linux, but there are a few challenges.

I first tried placing all the files in /usr/share/smlformat, then installing the bash script in /usr/bin as /usr/bin/smlformat, while changing BASE_DIR to /usr/share/smlformat.

This did not work out because the Standard ML code appears to need to write to the parent directory of /usr/share/smlformat.

Then I tried changing the bash script to copy all files in /usr/share/smlformat to /tmp/smlformat and then run the Standard ML code from there, every time the bash script was running.

This almost worked out, but the script hangs.

I also tried modifying the script to use /dev/stdin and /dev/stdout instead, but this did not work out either. The script either hangs or outputs the unformatted source data.

Could you please modify the project so that it is easier and/or possible to package for Arch Linux and other Linux or BSD distros?

If the Standard ML code was compiled to an executable, for instance, that would help.

Best regards, Alexander F. Rødseth