build-support/go: fix eval of vendorSha256 accesses
Before the change there was no way to poll for presence of
`vendorSha256` attribute:
$ nix-instantiate --strict --eval --expr 'with import ./. {}; _3mux.vendorSha256 or "no hash"'
error: attribute 'vendorSha256' missing
292| passthru = passthru // { inherit go goModules vendorHash; } // { inherit (args') vendorSha256; };
| ^
After the change the poll happens as expected:
$ nix-instantiate --strict --eval --expr 'with import ./. {}; _3mux.vendorSha256 or "no hash"'
"no hash"
This commit is contained in:
committed by
zowoq
parent
7b4bde6b2b
commit
a1422a7f8f
@@ -289,7 +289,8 @@ let
|
||||
|
||||
disallowedReferences = lib.optional (!allowGoReference) go;
|
||||
|
||||
passthru = passthru // { inherit go goModules vendorHash; } // { inherit (args') vendorSha256; };
|
||||
passthru = passthru // { inherit go goModules vendorHash; }
|
||||
// lib.optionalAttrs (args' ? vendorSha256 ) { inherit (args') vendorSha256; };
|
||||
|
||||
meta = {
|
||||
# Add default meta information
|
||||
|
||||
Reference in New Issue
Block a user