summary refs log tree commit diff
path: root/pkgs/development/go-modules
diff options
context:
space:
mode:
authorBenjamin Hipple <bhipple@protonmail.com>2020-03-11 02:04:46 -0400
committerJörg Thalheim <joerg@thalheim.io>2020-03-11 09:52:07 +0000
commit5f77ff63849396c2b0dd243c0bb9fdae13c0fab6 (patch)
tree0f50113449d57db7bb3d1f089956d7a9a326220d /pkgs/development/go-modules
parentb155a62dadb04d41cc8443d189d9168ccaba30af (diff)
downloadnixpkgs-5f77ff63849396c2b0dd243c0bb9fdae13c0fab6.tar
nixpkgs-5f77ff63849396c2b0dd243c0bb9fdae13c0fab6.tar.gz
nixpkgs-5f77ff63849396c2b0dd243c0bb9fdae13c0fab6.tar.bz2
nixpkgs-5f77ff63849396c2b0dd243c0bb9fdae13c0fab6.tar.lz
nixpkgs-5f77ff63849396c2b0dd243c0bb9fdae13c0fab6.tar.xz
nixpkgs-5f77ff63849396c2b0dd243c0bb9fdae13c0fab6.tar.zst
nixpkgs-5f77ff63849396c2b0dd243c0bb9fdae13c0fab6.zip
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.
Diffstat (limited to 'pkgs/development/go-modules')
-rw-r--r--pkgs/development/go-modules/generic/default.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/development/go-modules/generic/default.nix b/pkgs/development/go-modules/generic/default.nix
index 1bffb71e8f9..1bf13c18821 100644
--- a/pkgs/development/go-modules/generic/default.nix
+++ b/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