* 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
* Build with Nix 20.03 and GHC 8.6.5
Discards support for Nix versions strictly less than 1.12.
* Version 1.0.6
- Support and require hnix-0.7.0 or higher.
- Support GHC 8.10.1.
- Use nixpkgs 20.03 in Nix builds.
- Discard support for Nix versions < 1.12.
* Changes suggested by @evalrelf.
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.
* Remove the response integrity check
In commit 63129b1 I removed the check for the function that fetches
layers but did not remove it for the function that fetches a whole
image.
This change is being made because the `Docker-Content-Digest` value
sent back by docker distribution is a hash digest from the image
manifest list when only the image manifest is accepted by the client.
This issue on docker distribution tracks the regression:
https://github.com/docker/distribution/issues/2395Fixes#23
Issue #24 tracks reverting this change when the docker distribution
issue is resolved.
This change also fixes a test failure caused by the tests data dir not
being included in the cabal source distribution.
* Fix the incorrect serialization of the registry URI
* Require Aeson (>=) 1.0.0.0 and fix compilation error
... by importing the `Types` module to get the `Options` datatype.
* Refactor supporting Nix code and pin to nixpkgs-17.09 latest
* 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
This change adds `readField` implementations to the custom
`ParseField` instances of our custom data types.
This change is necessary because a `readField` implementation is
required as-of the `optparse-generic` release of version `1.2.3`.
* Remove response integrity check of config.json and layer
This change is being made because the `Docker-Content-Digest` value
sent back by docker distribution is a hash digest from the image
manifest list when only the image manifest is accepted by the client.
This issue on docker distribution tracks the regression:
https://github.com/docker/distribution/issues/2395Fixes#23
Issue #24 tracks reverting this change when the docker distribution
issue is resolved.
* Add the hocker tests data files
This fixes a test failure caused by the tests data dir not being
included in the cabal source distribution.
... we don't support image manifest lists yet and the public, official
docker registry recently began serving requests by clients that say
they accept it. We said we accept it but we don't actually know what
to do with it yet.