@@ -1,54 +0,0 @@
1−#! /usr/bin/env nix-shell
2−#! nix-shell -i bash -p coreutils findutils gnused nix wget
3−
4−set -x
5−
6−MAJOR_VERSION="5.5"
7−VERSION="${MAJOR_VERSION}.1"
8−# The trailing slash at the end is necessary!
9−RELEASE_URLS=(
10− "http://download.qt.io/official_releases/qt/$MAJOR_VERSION/$VERSION/submodules/"
11− "http://download.qt.io/community_releases/$MAJOR_VERSION/$VERSION/"
12−)
13−EXTRA_WGET_ARGS='-A *.tar.xz'
14−
15−mkdir tmp; cd tmp
16−
17−for url in "${RELEASE_URLS[@]}"; do
18− wget -nH -r -c --no-parent $url $EXTRA_WGET_ARGS
19−done
20−
21−cat >../srcs.nix <<EOF
22−# DO NOT EDIT! This file is generated automatically by fetchsrcs.sh
23−{ fetchurl, mirror }:
24−
25−{
26−EOF
27−
28−workdir=$(pwd)
29−
30−find . | sort | while read src; do
31− if [[ -f "${src}" ]]; then
32− url="${src:2}"
33− # Sanitize file name
34− filename=$(basename "$src" | tr '@' '_')
35− nameversion="${filename%.tar.*}"
36− name=$(echo "$nameversion" | sed -e 's,-[[:digit:]].*,,' | sed -e 's,-opensource-src$,,')
37− version=$(echo "$nameversion" | sed -e 's,^\([[:alpha:]][[:alnum:]]*-\)\+,,')
38− sha256=$(nix-hash --type sha256 --base32 --flat "$src")
39− cat >>../srcs.nix <<EOF
40− $name = {
41− version = "$version";
42− src = fetchurl {
43− url = "\${mirror}/$url";
44− sha256 = "$sha256";
45− name = "$filename";
46− };
47− };
48−EOF
49− fi
50−done
51−
52−echo "}" >>../srcs.nix
53−
54−cd ..