justinwoo / spago2nix

Generate a derivation of (old) Spago dependencies, and use them to install them into the directory structure used by Spago.
MIT License
42 stars 23 forks source link

Argparser and file options #41

Open Profpatsch opened 3 years ago

Profpatsch commented 3 years ago

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 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.