-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
fetchurl: fix overrideAttrs working as expect with hash #459487
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -190,7 +190,7 @@ lib.extendMkDerivation { | |||||||||||||||
| if hash != "" then | ||||||||||||||||
| { | ||||||||||||||||
| outputHashAlgo = null; | ||||||||||||||||
| outputHash = hash; | ||||||||||||||||
| outputHash = finalAttrs.hash; | ||||||||||||||||
| } | ||||||||||||||||
| else if outputHash != "" then | ||||||||||||||||
| if outputHashAlgo != "" then | ||||||||||||||||
|
|
@@ -200,17 +200,17 @@ lib.extendMkDerivation { | |||||||||||||||
| else if sha512 != "" then | ||||||||||||||||
| { | ||||||||||||||||
| outputHashAlgo = "sha512"; | ||||||||||||||||
| outputHash = sha512; | ||||||||||||||||
| outputHash = finalAttrs.sha512; | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||
| } | ||||||||||||||||
| else if sha256 != "" then | ||||||||||||||||
| { | ||||||||||||||||
| outputHashAlgo = "sha256"; | ||||||||||||||||
| outputHash = sha256; | ||||||||||||||||
| outputHash = finalAttrs.sha256; | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||
| } | ||||||||||||||||
| else if sha1 != "" then | ||||||||||||||||
| { | ||||||||||||||||
| outputHashAlgo = "sha1"; | ||||||||||||||||
| outputHash = sha1; | ||||||||||||||||
| outputHash = finalAttrs.sha1; | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||
| } | ||||||||||||||||
| else if cacert != null then | ||||||||||||||||
| { | ||||||||||||||||
|
|
@@ -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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This could be done from the
Suggested change
|
||||||||||||||||
|
|
||||||||||||||||
| # Disable TLS verification only when we know the hash and no credentials are | ||||||||||||||||
| # needed to access the resource | ||||||||||||||||
| SSL_CERT_FILE = | ||||||||||||||||
|
|
||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.