Commit Graph

62 Commits

Author SHA1 Message Date
Zoe Zuser
adfc3daf0c Add -f/--credentials-file option
... so you can trace / log the command line invocations without logging
your secrets.
2024-10-08 09:21:40 -07:00
Zoe Zuser
85e41732dd github: update macos runner 2024-10-08 09:02:59 -07:00
Mel Zuser
c7485f35ae
Support hnix-0.17 (#61)
* Support hnix-0.17

* mkApp was added back
2024-08-27 11:41:14 -05:00
Tomáš Drtina
f0b2235daa
Relax upper bound on turtle from < 1.6 to < 1.7 (#60) 2024-08-06 11:01:37 -05:00
John Carey
185b2c363e Support hnix-0.15 and hnix-0.16. 2023-11-14 13:09:23 -08:00
Parnell Springmeyer
14fa8ec148
docker2nix: inprocWithErr -> procStrictWithErr (#57)
* 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
2023-05-05 13:21:47 -05:00
Evan Relf
43d8e6cb8e Update CI config to support newer versions of Nix 2022-05-16 13:57:22 -07:00
Evan Relf
a2ea4ba66c Fix code to support aeson v2 2022-05-16 13:57:22 -07:00
Evan Relf
a21f2ccf6c Update bound on aeson 2022-05-16 13:57:22 -07:00
Evan Relf
5f611f0785 Update Nixpkgs pin 2022-05-16 13:57:22 -07:00
Evan Relf
b9bc5993aa Set up CI with GitHub Actions 2021-04-26 11:24:42 -07:00
Evan Relf
e47269d1b6 Use optparse-generic 1.4.4 2021-04-26 11:24:42 -07:00
Evan Relf
e130537447 Remove Setup.hs 2021-04-26 11:24:42 -07:00
Evan Relf
280fd5f6f8 Ignore Nix result symlinks 2021-04-26 11:24:42 -07:00
Evan Relf
b4ef7ba8e0 Add default.nix 2021-04-26 11:24:42 -07:00
Evan Relf
757b727589 Add shell.nix 2021-04-26 11:24:42 -07:00
Evan Relf
3a61ef6e07 Add Haskell packages overlay 2021-04-26 11:24:42 -07:00
Evan Relf
7cce30e1df Pin a recent revision of Nixpkgs 2021-04-26 11:24:42 -07:00
Evan Relf
ef44b8b8fc Remove old Nix code 2021-04-26 11:24:42 -07:00
intractable
4610befce9
Version 1.0.7: Use hnix 0.9.0+ (#53)
* Version 1.0.7: Use hnix 0.9.0+

* Version 1.0.7

- Support and require hnix-0.9.0 or higher.

* Update CHANGELOG.md
2020-10-28 10:33:42 -05:00
j6carey
fee4e3760c
Version 1.0.6: GHC 8.6 through 8.10, nixpkgs 20.03, and hnix 0.7+ (#50)
* 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.
2020-06-10 13:30:09 -05:00
Parnell Springmeyer
d088d2266a
Bump hnix dependency to a min-bound of 0.6.0 (#48)
Fixes #47.
2019-06-04 18:22:48 -05:00
Gabriel Gonzalez
b0c77ea043
Merge pull request #42 from awakesecurity/gabriel/latest_hnix
Build against latest `hnix`
2019-03-25 10:22:19 -07:00
Gabriel Gonzalez
513973ae71
Merge pull request #46 from awakesecurity/j6carey/hnix-0.6.0
Merge master to gabriel/latest_hnix and support hnix-0.6.0
2019-03-25 10:20:43 -07:00
John C. Carey
9645c7ab1e Merge master 2019-03-22 18:01:04 -07:00
j6carey
1fb1591c6c
Be compatible with foldl-1.4.5. (#45)
Starting with v1.4.5, foldl defines an "either"
that gets confused with the usual Prelude function
unless one uses a qualified import.
2019-03-18 16:59:34 -07:00
j6carey
b66b0bf3b6
Support newer versions of hnix... (#44)
...and avoid warnings on base library versions
in which Semigroup is a superclass of Monoid.
2019-02-22 12:43:52 -08:00
j6carey
584795c86e
Merge pull request #43 from awakesecurity/relax-async-version-bounds
Relax bounds on async.
2019-02-21 10:02:35 -08:00
John C. Carey
2364d8e404 Relax bounds on async. 2019-02-21 09:57:56 -08:00
Gabriel Gonzalez
e46ed6e284 Build against hnix master
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.
2018-12-06 14:25:37 -08:00
Parnell Springmeyer
88150c7b8a
outputSha256 should be the hash given to builtins.fetchTarball (#39)
... since it expects the fixed-output hash, not the intermediate hash
that is used by the Nix 1.11.x logic.

Fixes #38.
2018-03-29 12:47:37 -05:00
Parnell Springmeyer
eba575d1e0
Relax upper bound on turtle from < 1.5 to < 1.6 (#40)
Fixes #37.
2018-03-29 12:43:47 -05:00
Parnell Springmeyer
e57046d678
Make the golden test files Windows-path compliant (#36)
... to appease Hackage.
2018-02-12 11:15:32 -06:00
Parnell Springmeyer
45790308d7
1.0.4 -> 1.0.5 (#35) 2018-02-12 10:56:39 -06:00
Parnell Springmeyer
19c51d0d3c
Fix hocker-image (#34)
* 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/2395

Fixes #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
2018-02-12 09:41:29 -06:00
Parnell Springmeyer
ef9e6bdf13
Explicitly specify the golden test data (#33)
... because `data-dir` was incorrect and doesn't work.
2018-02-12 09:41:16 -06:00
Parnell Springmeyer
06413f5423
Refactor supporting Nix code and pin to nixpkgs-17.09 latest (#32)
* 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
2018-02-11 14:43:49 -06:00
Parnell Springmeyer
5d49f7755c
1.0.3 -> 1.0.4 (#31) 2018-01-05 12:17:48 -06:00
Parnell Springmeyer
0a631f2ea0
Switch to nix-paths instead of wrapProgram (#30)
* 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
2018-01-05 11:09:12 -06:00
Parnell Springmeyer
6103868b05
1.0.2 -> 1.0.3 (#29)
* 1.0.2 -> 1.0.3

* Add the Only package to fix Hydra evaluation error
2018-01-03 17:51:15 -06:00
Parnell Springmeyer
987b7f1fa2
Add readField implementations to custom ParseField instances (#28)
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`.
2018-01-03 17:37:15 -06:00
Parnell Springmeyer
3994ad1b29
Update changelog describing what changed in 1.0.2 (#27) 2017-12-01 13:17:42 -06:00
Parnell Springmeyer
d2f7b5f54c
1.0.1 -> 1.0.2 (#26) 2017-12-01 13:12:22 -06:00
Parnell Springmeyer
63129b1d49
Fix response integrity check bug (#23) and fix missing tests data (#25)
* 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/2395

Fixes #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.
2017-12-01 13:06:52 -06:00
Parnell Springmeyer
9e10392a36
Patch-bump for hocker-manifest fix, add changelog entry (#22) 2017-12-01 10:46:42 -06:00
Parnell Springmeyer
c37f317797
Only accept the image manifest format (#20)
... 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.
2017-12-01 10:36:51 -06:00
Parnell Springmeyer
592d1a2d88
Revert "Only accept the image manifest format" (#19)
This reverts commit 3463253597.
2017-12-01 10:32:00 -06:00
Parnell Springmeyer
3463253597
Only accept the image manifest format
... we don't support image manifest lists yet.
2017-12-01 10:20:15 -06:00
Parnell Springmeyer
887f65de26
Prepare the hocker package for hackage (#18)
* Remove -Werror, awakenetworks -> awakesecurity, add a changelog

* Awake networks -> Awake Security

* Shorten synopsis
2017-11-28 11:00:47 -06:00
Parnell Springmeyer
ad945f89e6 Requalify all Lib.<fn> use-sites with Hocker.Lib. (#17) 2017-10-20 12:57:25 -05:00