Created
August 12, 2016 06:31
-
-
Save shajra-cs/adc3941cf91c2abdcd22e807b4b67d2d to your computer and use it in GitHub Desktop.
code review of a download derivation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source "$stdenv/setup" | |
curl \ | |
--insecure \ | |
--retry 3 \ | |
--netrc-file "$netrc" \ | |
"$url" > "$out" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv | |
, curl | |
}: | |
{ netrc | |
, url | |
, name | |
, sha256 | |
}: | |
stdenv.mkDerivation { | |
name = name; | |
buildInputs = [ curl ]; | |
inherit netrc url; | |
impureEnvVars = [ "netrc" ]; | |
builder = ./builder.sh; | |
outputHashAlgo = "sha256"; | |
outputHash = sha256; | |
outputHashMode = "flat"; | |
preferLocalBuild = true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment