fetchurl: support executables

+10 -2
+5
pkgs/build-support/fetchurl/builder.sh
··· 45 46 finish() { 47 set +o noglob 48 runHook postFetch 49 stopNest 50 exit 0
··· 45 46 finish() { 47 set +o noglob 48 + 49 + if [[ $executable == "1" ]]; then 50 + chmod +x $downloadedFile 51 + fi 52 + 53 runHook postFetch 54 stopNest 55 exit 0
+5 -2
pkgs/build-support/fetchurl/default.nix
··· 73 # is communicated to postFetch via $downloadedFile. 74 downloadToTemp ? false 75 76 , # If set, don't download the file, but write a list of all possible 77 # URLs (resulting from resolving mirror:// URLs) to $out. 78 showURLs ? false ··· 116 outputHash = if outputHash != "" then outputHash else 117 if sha256 != "" then sha256 else if sha1 != "" then sha1 else md5; 118 119 - outputHashMode = if recursiveHash then "recursive" else "flat"; 120 121 - inherit curlOpts showURLs mirrorsFile impureEnvVars postFetch downloadToTemp; 122 123 # Doing the download on a remote machine just duplicates network 124 # traffic, so don't do that.
··· 73 # is communicated to postFetch via $downloadedFile. 74 downloadToTemp ? false 75 76 + , # If true, set executable bit on downloaded file 77 + executable ? false 78 + 79 , # If set, don't download the file, but write a list of all possible 80 # URLs (resulting from resolving mirror:// URLs) to $out. 81 showURLs ? false ··· 119 outputHash = if outputHash != "" then outputHash else 120 if sha256 != "" then sha256 else if sha1 != "" then sha1 else md5; 121 122 + outputHashMode = if (recursiveHash || executable) then "recursive" else "flat"; 123 124 + inherit curlOpts showURLs mirrorsFile impureEnvVars postFetch downloadToTemp executable; 125 126 # Doing the download on a remote machine just duplicates network 127 # traffic, so don't do that.