* docker2nix: `inprocWithErr` -> `procStrictWithErr`
... because `nix` utilities will sometimes return warnings and other
information to `stderr`. The type of `inprocWithErr` makes it pretty
clear that we should expect a result of _either_ the stderr text _or_
the stdout text. Not both! Normally, this is fine because errors will
be returned on `stderr`, however this is problematic when nix outputs
warnings as the utility will end up treating them as errors.
So we need a function that will give us both and that's
`procStrictWithErr`.
* Fix CI
* Cleanup a lot of annoying compiler warnings
* Fixup prettyprinter deprecation warnings
* One more prettyprinter fix
* Swap the stdout and stderr return field bindings...
* s/Prettyprint/Prettyprinter/
* Strip whitespace from result
The motivation for this branch is so that `hocker` and `dhall` can both be
used within the same dependency tree.
The context for this is that `dhall` requires `megaparsec-7.0.0` or newer
whereas the latest `hnix` on Hackage only supports up to `megaparsec < 7.0`.
Since `hocker` depends on `hnix` that means that `hocker` is incompatible with
`dhall` if `hocker` depends on an `hnix` from Hackage.
However, the `master` branch of `hnix` on GitHub supports `megaparsec-7.*`, so
this change updates `hocker` to build against that.
Note that this shouldn't be merged until `hnix` pushes out a new release to
Hackage.
* Use nix-paths over wrapProgram
This change switches from using `wrapProgram` to supply paths to the
Nix executables to the Haskell package `nix-paths`.
There are two motivations:
1. `nix-paths` will throw a compile-time error if it cannot find a
path for any of the primary Nix executables (Nix is a dependency of
this package inside of nixpkgs too so we don't need to worry about
it anymore)
2. `wrapProgram` now throws an error if globbed file paths are given
as input
* Cleanup unused import
* Move Types/ and Types.hs under Hocker/
* Update modules and imports with new qualifier
Fixes#11
* Turn on -Werror and sort build-depends
* Ignore unused-do-bind
* Refactoring polish and haddocks documentation refactor
* Remove tested with 7.10.2 until we actually test it
* Remove the TODO header as most of that is done now
* Fixing the output of docker2nix
- fetchdocker's function argument set needed to be a recursive set in
order for inherits to work correctly
- fetchDockerLayers does not take a tag argument, so only inherit the
registry, repository, and imageName attributes
* Fixing the golden test and updating the README
* Print the resulting nix expression with a trailing newline
Suggested by @Gabriel439