-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support fetching docker images from V2 registries #32248
Merged
Merged
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
2586568
docker: init fetchdocker nix code for docker2nix
ixmatus c1eb962
fetchdocker: Integration test exercising hocker and fetchdocker
ixmatus 6c9de3f
hocker: Don't check package and wrap the binaries with PATH to nix
ixmatus a6cdf0a
Merge branch 'master' into parnell/fetchdocker
ixmatus e4ec980
Merge remote-tracking branch 'upstream/master' into parnell/fetchdocker
ixmatus bd9869d
Merge branch 'master' into parnell/fetchdocker
ixmatus c2a5f68
Merge branch 'master' into parnell/fetchdocker
ixmatus 6f95cb1
Merge branch 'master' into parnell/fetchdocker
ixmatus 0a603ee
Merge remote-tracking branch 'upstream/master' into parnell/fetchdocker
ixmatus 58895aa
Merge branch 'parnell/fetchdocker' of github.com:awakesecurity/nixpkg…
ixmatus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the package should declare its dependency on Nix, i.e. by depending on http://hackage.haskell.org/package/nix-paths?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only utility from the hocker package that depends on Nix (other than the tests) is
docker2nix
; I think that's clear enough for now. I agree that a build-time dependency on Nix is better than a run-time dependency, so thank you for pointing me atnix-paths
. Here are my reasons why I don't think we should gate this PR on that, though:nix-paths
works; it looks like it has magic constants in it but I don't understand where those come from; a minimal README.md for the project would help a lot I think (note that if you explain it all to me, I'm also happy to submit a PR with a README.md contribution)docker2nix
isnix-hash
, which is not provided bynix-paths
. I can submit a PR to fix that but I don't think we should gate this PR on that and I also want to understand hownix-paths
works first before contributing more functionalityThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
http://hackage.haskell.org/package/nix-paths-1.0.1 adds support for
nix-hash
. The paths are determined areconfigure
-time by Cabal. Look atSetup.lhs
for the implementation.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding support for
nix-hash
@peti. I'll probably get to that soon. In the meantime can I get a review of the other parts of this PR?I don't think using
nix-paths
is a blocker for this PR but if it is, could you say so?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not call the
hocker
-related overrides a blocker. That's too strong a term, IMHO. What I can say though is that I won't merge the PR as-is. Other Nixpkgs maintainers may very well feel differently about it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, thanks for clarifying!
I'd like to clarify my understanding of
nix-paths
(would you accept a PR adding a README.md with anything I learn? That may help newcomers and provide a reference to point people at).I see now that
Setup.lhs
discovers the absolute path to, say,nix-hash
usinglookupProgram
which is great because ifnix-hash
is not available, it becomes a compile-time error and not a run-time error (I think this is great, btw, I wish this were more easily discovered!) Doing this removes the need for thewrapProgram
invocations but it does require thatnix-paths
is included in thebuildInputs
ofhocker
's derivation (as a build-time and run-time dependency). Do I have this right?Additionally, I think the generated derivation for the
nix-paths
hackage package only includes the Nix package in thenativeBuildInputs
; shouldn't it be in thepropagatedBuildInputs
so that the same Nix used as a build-time dependency is included in the run-time closure of any program that depends onnix-paths
?Also, the generated derivation for the
nix-paths
hackage package restricts the hydra build to Linux:hydraPlatforms = [ "i686-linux" "x86_64-linux" ];
what's the reason for this?hocker
is usable on Darwin systems, will thehydraPlatforms
line preventhocker
from being integrated on a Darwin worker?