buildGoModule: passthru the modSha256 (#82027)

The builder does not technically need the modSha256 of the vendor dir, and even
though we pass it the entire vendor dir it makes sense not to risk having an
accidental dependency on that variable.

However, tools like [nixpkgs-update](https://github.com/ryantm/nixpkgs-update)
need to inspect the `modSha256` of a package in order to be able to update them,
and since this is a real part of the package (describes info about its
dependencies) let's add it to `passthru`.

Specifically, this allows us to run a cmd like `nix eval -f . tflint.modSha256`
to get the current value, which is how the bot finds it to replace with the new
version in the Rust ecosystem.
wip/yesman
Benjamin Hipple 4 years ago committed by Jörg Thalheim
parent b155a62dad
commit 5f77ff6384
No known key found for this signature in database
GPG Key ID: 003F2096411B5F92
  1. 2
      pkgs/development/go-modules/generic/default.nix

@ -210,7 +210,7 @@ let
disallowedReferences = lib.optional (!allowGoReference) go;
passthru = passthru // { inherit go go-modules; };
passthru = passthru // { inherit go go-modules modSha256; };
meta = {
# Add default meta information

Loading…
Cancel
Save