diff options
Diffstat (limited to 'pkgs/tools/misc/pipelight/pipelight-fixup.patch')
-rw-r--r-- | pkgs/tools/misc/pipelight/pipelight-fixup.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/pkgs/tools/misc/pipelight/pipelight-fixup.patch b/pkgs/tools/misc/pipelight/pipelight-fixup.patch new file mode 100644 index 000000000000..8033e8458d08 --- /dev/null +++ b/pkgs/tools/misc/pipelight/pipelight-fixup.patch @@ -0,0 +1,54 @@ +diff -urN pipelight2.old/share/pipelight/install-dependency pipelight2.new/share/pipelight/install-dependency +--- pipelight2.old/share/pipelight/install-dependency 2014-07-27 01:38:39.806379602 +0200 ++++ pipelight2.new/share/pipelight/install-dependency 2014-07-27 01:40:08.689861556 +0200 +@@ -734,42 +734,14 @@ + return 0 + } + +-# Use fetch on FreeBSD if wget is not available +-if command -v wget >/dev/null 2>&1; then +- download_file() +- { +- wget -O "$1" "$2" +- } +- get_download_size() +- { +- local filesize="$(wget -O- "$1" --spider --server-response 2>&1 | sed -ne '/Content-Length/{s/.*: //;p}')" +- local re='^[0-9]+$' +- if [[ "$filesize" -ne "0" ]] && [[ "$filesize" =~ $re ]]; then +- echo "$(($filesize/(1024*1024)))" +- else +- echo "N/A" +- fi +- } +-elif command -v fetch >/dev/null 2>&1; then +- download_file() +- { +- fetch -o "$1" "$2" +- } +- get_download_size() +- { +- echo "N/A" +- } +-else +- download_file() +- { +- echo "ERROR: Could neither find wget nor fetch. Unable to download file!" >&2 +- return 1 +- } +- get_download_size() +- { +- echo "N/A" +- } +-fi ++download_file() ++{ ++ curl --cacert /etc/ssl/certs/ca-bundle.crt -o "$1" "$2" ++} ++get_download_size() ++{ ++ echo "N/A" ++} + + # Use shasum instead of sha256sum on MacOS / *BSD + if ! command -v sha256sum >/dev/null 2>&1 && command -v shasum >/dev/null 2>&1; then |