1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 19:51:17 +00:00

Revert "fetch-kde-qt.sh: get hashes from metadata"

This reverts commit 4b7d9dc868.

The KDE project has changed their source index pages so that the links to
package metadata files are generated by JavaScript after the page loads. As a
result, wget is no longer able to recursively fetch the package metadata
automatically.
This commit is contained in:
Thomas Tuegel 2020-12-24 07:58:53 -06:00
parent d45783a43f
commit 3db04334e3
No known key found for this signature in database
GPG key ID: 22CBF5249D4B4D59
7 changed files with 13 additions and 11 deletions

View file

@ -14,13 +14,12 @@ fi
tmp=$(mktemp -d)
pushd $tmp >/dev/null
wget -nH -r -c --no-parent "${WGET_ARGS[@]}" -A '*.tar.xz.sha256' -A '*.mirrorlist' >/dev/null
find -type f -name '*.mirrorlist' -delete
wget -nH -r -c --no-parent "${WGET_ARGS[@]}" >/dev/null
csv=$(mktemp)
find . -type f | while read src; do
# Sanitize file name
filename=$(gawk '{ print $2 }' "$src" | tr '@' '_')
filename=$(basename "$src" | tr '@' '_')
nameVersion="${filename%.tar.*}"
name=$(echo "$nameVersion" | sed -e 's,-[[:digit:]].*,,' | sed -e 's,-opensource-src$,,' | sed -e 's,-everywhere-src$,,')
version=$(echo "$nameVersion" | sed -e 's,^\([[:alpha:]][[:alnum:]]*-\)\+,,')
@ -40,8 +39,8 @@ gawk -F , "{ print \$1 }" $csv | sort | uniq | while read name; do
latestVersion=$(echo "$versions" | sort -rV | head -n 1)
src=$(gawk -F , "/^$name,$latestVersion,/ { print \$3 }" $csv)
filename=$(gawk -F , "/^$name,$latestVersion,/ { print \$4 }" $csv)
url="$(dirname "${src:2}")/$filename"
sha256=$(gawk '{ print $1 }' "$src")
url="${src:2}"
sha256=$(nix-hash --type sha256 --base32 --flat "$src")
cat >>"$SRCS" <<EOF
$name = {
version = "$latestVersion";

View file

@ -1 +1 @@
WGET_ARGS=(http://download.kde.org/stable/release-service/20.08.2/src)
WGET_ARGS=( http://download.kde.org/stable/release-service/20.08.2/src -A '*.tar.xz' )

View file

@ -1 +1 @@
WGET_ARGS=( https://download.kde.org/stable/plasma/5.20.4/ )
WGET_ARGS=( https://download.kde.org/stable/plasma/5.20.4/ -A '*.tar.xz' )

View file

@ -1 +1 @@
WGET_ARGS=(https://download.kde.org/stable/frameworks/5.76/)
WGET_ARGS=( https://download.kde.org/stable/frameworks/5.76/ -A '*.tar.xz' )

View file

@ -1 +1,2 @@
WGET_ARGS=( http://download.qt.io/official_releases/qt/5.12/5.12.7/submodules/ )
WGET_ARGS=( http://download.qt.io/official_releases/qt/5.12/5.12.7/submodules/ \
-A '*.tar.xz' )

View file

@ -1 +1,2 @@
WGET_ARGS=( http://download.qt.io/official_releases/qt/5.14/5.14.2/submodules/ )
WGET_ARGS=( http://download.qt.io/official_releases/qt/5.14/5.14.2/submodules/ \
-A '*.tar.xz' )

View file

@ -1 +1,2 @@
WGET_ARGS=( http://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/ )
WGET_ARGS=( http://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/ \
-A '*.tar.xz' )