diff options
author | Thomas Tuegel <ttuegel@gmail.com> | 2016-06-17 09:47:16 -0500 |
---|---|---|
committer | Thomas Tuegel <ttuegel@gmail.com> | 2016-06-17 09:47:16 -0500 |
commit | 592dcbc4bfbdd98ee2f22bdea1b895db337cb770 (patch) | |
tree | 7c8393029dda31527c5c26cd963408224a9e15aa /maintainers/scripts | |
parent | 8e3a674305c6e726d522d8541e162f55a73fb5c6 (diff) |
Fix evaluation error in Qt/KDE packages
For now, the source hashes will continue to be stored in the Nixpkgs tree. The package update instructions are updated.
Diffstat (limited to 'maintainers/scripts')
-rwxr-xr-x | maintainers/scripts/fetch-kde-qt.sh | 49 | ||||
-rwxr-xr-x | maintainers/scripts/generate-kde-applications.sh | 3 | ||||
-rwxr-xr-x | maintainers/scripts/generate-kde-frameworks.sh | 3 | ||||
-rwxr-xr-x | maintainers/scripts/generate-kde-plasma.sh | 3 | ||||
-rwxr-xr-x | maintainers/scripts/generate-qt.sh | 3 |
5 files changed, 61 insertions, 0 deletions
diff --git a/maintainers/scripts/fetch-kde-qt.sh b/maintainers/scripts/fetch-kde-qt.sh new file mode 100755 index 0000000000000..c88d8729acea8 --- /dev/null +++ b/maintainers/scripts/fetch-kde-qt.sh @@ -0,0 +1,49 @@ +#! /usr/bin/env nix-shell +#! nix-shell -i bash -p coreutils findutils gnused nix wget + +tmp=$(mktemp -d) +pushd $tmp >/dev/null +wget -nH -r -c --no-parent "$@" >/dev/null + +csv=$(mktemp) +find . -type f | while read src; do + # Sanitize file name + filename=$(basename "$src" | tr '@' '_') + nameVersion="${filename%.tar.*}" + name=$(echo "$nameVersion" | sed -e 's,-[[:digit:]].*,,' | sed -e 's,-opensource-src$,,') + version=$(echo "$nameVersion" | sed -e 's,^\([[:alpha:]][[:alnum:]]*-\)\+,,') + echo "$name,$version,$src,$filename" >>$csv +done + +cat <<EOF +# DO NOT EDIT! This file is generated automatically by fetchsrcs.sh +{ fetchurl, mirror }: + +{ +EOF + +gawk -F , "{ print \$1 }" $csv | sort | uniq | while read name; do + versions=$(gawk -F , "/^$name,/ { print \$2 }" $csv) + 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="${src:2}" + sha256=$(nix-hash --type sha256 --base32 --flat "$src") + cat <<EOF + $name = { + version = "$latestVersion"; + src = fetchurl { + url = "\${mirror}/$url"; + sha256 = "$sha256"; + name = "$filename"; + }; + }; +EOF +done + +echo "}" + +popd >/dev/null +rm -fr $tmp >/dev/null + +rm -f $csv >/dev/null diff --git a/maintainers/scripts/generate-kde-applications.sh b/maintainers/scripts/generate-kde-applications.sh new file mode 100755 index 0000000000000..525abcc3c2dd9 --- /dev/null +++ b/maintainers/scripts/generate-kde-applications.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +./fetch-kde-qt.sh http://download.kde.org/stable/applications/16.04.2/ -A '*.tar.xz' diff --git a/maintainers/scripts/generate-kde-frameworks.sh b/maintainers/scripts/generate-kde-frameworks.sh new file mode 100755 index 0000000000000..aa693ced704d6 --- /dev/null +++ b/maintainers/scripts/generate-kde-frameworks.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +./fetch-kde-qt.sh http://download.kde.org/stable/frameworks/5.22/ -A '*.tar.xz' diff --git a/maintainers/scripts/generate-kde-plasma.sh b/maintainers/scripts/generate-kde-plasma.sh new file mode 100755 index 0000000000000..fa804758f09bd --- /dev/null +++ b/maintainers/scripts/generate-kde-plasma.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +./fetch-kde-qt.sh http://download.kde.org/stable/plasma/5.6.5/ -A '*.tar.xz' diff --git a/maintainers/scripts/generate-qt.sh b/maintainers/scripts/generate-qt.sh new file mode 100755 index 0000000000000..61691520696f9 --- /dev/null +++ b/maintainers/scripts/generate-qt.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +./fetch-kde-qt.sh http://download.qt.io/official_releases/qt/5.6/5.6.1/submodules/ -A '*.tar.xz' |