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
docker-slim: init at 1.26.1 #75564
docker-slim: init at 1.26.1 #75564
Conversation
bc9edfd
to
e2ea94f
Compare
@GrahamcOfBorg build docker-slim |
Why does the |
@@ -0,0 +1,29 @@ | |||
{ buildGoModule, fetchFromGitHub, stdenv, docker }: | |||
|
|||
buildGoModule rec { |
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.
please use buildGoPackage
, because upstream vendorizes its dependencies
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.
Sure, thanks. Can you please tell me how to recognize that myself so I can be better in the future?
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.
Sure, thanks. Can you please tell me how to recognize that myself so I can be better in the future?
If upstream has its dependencies in a vendor/
directory, it's fine to use buildGoPackage
, if go.mod
is used, buildGoModule
can be used :)
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.
sorry for the delay
Can you please tell me how to recognize that myself so I can be better in the future?
The main difference between both, is that buildGoModule
abuses fixed-output derivations which may not be preferable; because introduces impurities, such as network access NixOS/nix#2270
As @Ma27 mentioned, we should buildGoPackage
when a package vendorizes its dependencies (vendor/
directory), since it's a regular expression and we don’t have to maintain a deps.nix
In the rest of the cases, the maintainer can choose which function to use
homepage = "https://github.com/docker-slim/docker-slim"; | ||
license = licenses.asl20; | ||
maintainers = with maintainers; [ filalex77 ]; | ||
platforms = docker.meta.platforms; |
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.
just curious, does it depend on docker?
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.
It takes images by name, so I assume it asks Docker for them.
@filalex77 Did you get a chance to make the requested changes? I also started packaging this module and found your PR on the way. |
@mbrgm I ran into some issues with the proposed changes, and didn't have the time to figure it out. You're more than welcome to submit your PR, just let me know - and I'll close this one. Thanks! |
@filalex77 See #76831. Feel free to review the new PR. |
Closing in favor of #76831. |
Motivation for this change
https://github.com/docker-slim/docker-slim/releases/tag/1.26.1
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)This change is