Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions pkgs/build-support/fetchurl/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ lib.extendMkDerivation {
if hash != "" then
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if hash != "" then
if finalAttrs.hash != "" then

{
outputHashAlgo = null;
outputHash = hash;
outputHash = finalAttrs.hash;
}
else if outputHash != "" then
if outputHashAlgo != "" then
Expand All @@ -200,17 +200,17 @@ lib.extendMkDerivation {
else if sha512 != "" then
{
outputHashAlgo = "sha512";
outputHash = sha512;
outputHash = finalAttrs.sha512;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
outputHash = finalAttrs.sha512;
outputHash = sha512;

}
else if sha256 != "" then
{
outputHashAlgo = "sha256";
outputHash = sha256;
outputHash = finalAttrs.sha256;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
outputHash = finalAttrs.sha256;
outputHash = sha256;

}
else if sha1 != "" then
{
outputHashAlgo = "sha1";
outputHash = sha1;
outputHash = finalAttrs.sha1;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
outputHash = finalAttrs.sha1;
outputHash = sha1;

}
else if cacert != null then
{
Expand Down Expand Up @@ -261,6 +261,14 @@ lib.extendMkDerivation {
# New-style output content requirements.
inherit (hash_) outputHashAlgo outputHash;

# Make overrideAttrs behave as expected
inherit
hash
sha1
sha256
sha512
;
Comment on lines +264 to +270
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be done from the excludeDrvArgNames side, as we don't need them to be present all the time.

Suggested change
# Make overrideAttrs behave as expected
inherit
hash
sha1
sha256
sha512
;


# Disable TLS verification only when we know the hash and no credentials are
# needed to access the resource
SSL_CERT_FILE =
Expand Down
Loading