Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

Br1ght0ne
Copy link
Member

@Br1ght0ne Br1ght0ne commented Dec 12, 2019

Motivation for this change

https://github.com/docker-slim/docker-slim/releases/tag/1.26.1

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

This change is Reviewable

@Br1ght0ne
Copy link
Member Author

@GrahamcOfBorg build docker-slim

@Br1ght0ne
Copy link
Member Author

Why does the x86_64-darwin build get different hashes for the source derivation? Weird.

@@ -0,0 +1,29 @@
{ buildGoModule, fetchFromGitHub, stdenv, docker }:

buildGoModule rec {
Copy link
Contributor

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

Copy link
Member Author

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?

Copy link
Member

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 :)

Copy link
Contributor

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;
Copy link
Contributor

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?

Copy link
Member Author

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.

@mbrgm
Copy link
Member

mbrgm commented Jan 2, 2020

@filalex77 Did you get a chance to make the requested changes? I also started packaging this module and found your PR on the way.

@Br1ght0ne
Copy link
Member Author

@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!

@mbrgm mbrgm mentioned this pull request Jan 2, 2020
10 tasks
@mbrgm
Copy link
Member

mbrgm commented Jan 2, 2020

@filalex77 See #76831. Feel free to review the new PR.

@Br1ght0ne
Copy link
Member Author

Closing in favor of #76831.

@Br1ght0ne Br1ght0ne closed this Jan 3, 2020
@Br1ght0ne Br1ght0ne deleted the docker-slim-1.26.1 branch January 3, 2020 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants