-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
fix dockertools.pullImage on darwin #41908
Conversation
Could you add to describe a bit these arguments and the default behavior in the manual? |
428c44b
to
c2932a2
Compare
Like this? |
c2932a2
to
3407cf3
Compare
@nicknovitski I was actually more talking about describing these new arguments of
|
Oh, sure! 😄 |
(you can easily build the manual by running |
a95816e
to
bf39fee
Compare
Thank you, I've fixed my build errors. |
@GrahamcOfBorg test docker-tools |
Success on aarch64-linux Attempted: tests.docker-tools No partial log is available. |
Failure on x86_64-linux (full log) Attempted: tests.docker-tools Partial log (click to expand)
|
I'm not sure I understand the failure, but it looks to me that like there's a nixos test for docker-tools, and some derivations it depends on failed to build. Is that right? |
bf39fee
to
01af8f2
Compare
This looks good to me but I'm also not sure what the problem is with the test. |
@GrahamcOfBorg test docker-tools |
No attempt on x86_64-linux (full log) The following builds were skipped because they don't evaluate on x86_64-linux: tests.docker-tools Partial log (click to expand)
|
Success on aarch64-linux Attempted: tests.docker-tools No partial log is available. |
@GrahamcOfBorg build spokeo |
No attempt on x86_64-linux (full log) The following builds were skipped because they don't evaluate on x86_64-linux: spokeo Partial log (click to expand)
|
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: spokeo Partial log (click to expand)
|
@GrahamcOfBorg build skopeo |
Success on x86_64-linux (full log) Attempted: skopeo Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: skopeo Partial log (click to expand)
|
@@ -37,8 +37,8 @@ buildGoPackage rec { | |||
''; | |||
|
|||
preBuild = '' | |||
export CGO_CFLAGS="-I${getDev gpgme}/include -I${getDev libgpgerror}/include -I${getDev devicemapper}/include -I${getDev btrfs-progs}/include" | |||
export CGO_LDFLAGS="-L${getLib gpgme}/lib -L${getLib libgpgerror}/lib -L${getLib devicemapper}/lib" | |||
export CGO_CFLAGS="-I${getDev gpgme}/include${lib.optionalString stdenv.isLinux " -I${getDev libgpgerror}/include -I${getDev devicemapper}/include -I${getDev btrfs-progs}/include"}" |
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.
Might this make more sense as CGO_CFLAGS=$CFLAGS
? and same with LDFLAGS
. I think stdenv sets up the -I
automatically for us in CFLAGS
so this would mirror the buildInputs
conditional logic more naturally.
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'll try that.
No attempt on x86_64-darwin (full log) The following builds were skipped because they don't evaluate on x86_64-darwin: spokeo Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: skopeo Partial log (click to expand)
|
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.
What are you going to do with pullImage on Darwin?
Use it as an argument to buildImage. I've realized there isn't much I can do without cross-compilation, but, ehn, maybe I could try to make it work. |
@nicknovitski yeah, I've been working on https://github.com/nix-community/linuxkit-builder for this reason. Would love for my team to easily build Docker images using Nix on Darwin ❤️ |
As @copumpkin suggests, I'm going to try a simpler way of setting CGO_* env vars. e: pushed changes |
01af8f2
to
6f6e582
Compare
@puffnfresh in my case I found this because I wanted to interact with a docker registry with skopeo from my Mac 😄and of course skopeo doesn't work on macOS without this PR |
@copumpkin yeah, definitely no reason why Skopeo shouldn't work well on macOS. |
Could a Darwin |
@copumpkin should be able to |
6f6e582
to
c58b11d
Compare
Rebased on upstream skopeo change. Is there something blocking this that I can fix? |
@GrahamcOfBorg build skopeo |
And no, if the borg says we're good, I'll click merge. Thanks for your patience @nicknovitski |
Success on x86_64-darwin (full log) Attempted: skopeo Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: skopeo Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: skopeo Partial log (click to expand)
|
Thanks! |
Motivation for this change
buildImage
works, so I wanted to start using it.The
--override-{os,architecture}
arguments are necessary for me, since skopeo's default behavior is to choose the manifest which matches the host system's os and architecture. For people on macs, this frequently doesn't exist, and is rarely what we want.Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)