This fixes a downstream problem we have in a company project, where in order to run spago2nix in a temporary directory we need to jump through hoops to copy the .spago2nix and spago.dhall files around instead of just passing them as arguments.
I took the chance to switch to an optparse library, which simplifies adding new flags by a lot (until now it was only positional arguments, but optional stuff like flags is not so easy to parse adhoc-ly.
Alternatively, we could keep the argparser as it is and stub the files with environment variables.
Contains https://github.com/justinwoo/spago2nix/pull/40
This fixes a downstream problem we have in a company project, where in order to run spago2nix in a temporary directory we need to jump through hoops to copy the
.spago2nix
andspago.dhall
files around instead of just passing them as arguments.I took the chance to switch to an optparse library, which simplifies adding new flags by a lot (until now it was only positional arguments, but optional stuff like flags is not so easy to parse adhoc-ly.
Alternatively, we could keep the argparser as it is and stub the files with environment variables.