Resolves#192
Also avoids the unqualified import on `GitHub` in GH.hs, since this lib's types
are already complex/confusing enough without the ambiguity!
1. We should always use `~/.cache/nixpkgs`, since if we do it in PWD the hard
resets risk blowing away user work!
2. Previously, we weren't fetching and resetting to up-to-date master, which
meant cmds would fail if your nixpkgs checkout was stale.
3. Previously, we were ignoring the `--pr` option entirely. This fixes that bug
by passing the bool into the UpdateEnv, and also cleans up the selected options
in the logger so it's easier to see.
4. We were including the title PR twice, like this:
https://github.com/NixOS/nixpkgs/pull/86624
There are still some issues and things to improve, but with this PR I've managed
to get a working usage here:
https://github.com/NixOS/nixpkgs/pull/86625
* instead of --dry-run use --pr to indicate a PR is wanted
* instead of additional updates, have update take the update as an
argument
* print out stdout instead of log file in the case of non-batch
updates
* print PR message to log even in the case of no PR
No functional change; this pulls out all of the changes except the `polysemy`
refactoring from here:
https://github.com/ryantm/nixpkgs-update/pull/172
This will allow us to do development with the newer GHC and cleaned up
dependency stack, start using the `hspec` test suite, vet the `github` library
updates, etc., while we work on porting more of the effects to polysemy and
evaluating how it looks.